AppManager

public class AppManager
extends Object implements Manager

java.lang.Object
   ↳ androidx.car.app.AppManager


Manages the communication between the app and the host.

Summary

Public methods

void invalidate()

Requests the current template to be invalidated, which eventually triggers a call to Screen.onGetTemplate() to get the new template to display.

void setSurfaceCallback(SurfaceCallback surfaceCallback)

Sets the SurfaceCallback to get changes and updates to the surface on which the app can draw custom content, or null to reset the listener.

void showToast(CharSequence text, int duration)

Shows a toast on the car screen.

Inherited methods

Public methods

invalidate

public void invalidate ()

Requests the current template to be invalidated, which eventually triggers a call to Screen.onGetTemplate() to get the new template to display.

Throws
HostException if the remote call fails

setSurfaceCallback

public void setSurfaceCallback (SurfaceCallback surfaceCallback)

Sets the SurfaceCallback to get changes and updates to the surface on which the app can draw custom content, or null to reset the listener.

This c