setPhoneAppCallback

Registers the phone app callback to receive events from Android Auto.

Called from MainActivity.onCreate() after the callback is created. If Android Auto is already connected, the callback will be notified immediately.

Unregister it (null) when the phone app stops serving Android Auto, typically when the Activity that registered it is destroyed: whether a callback is registered decides whether phoneState carries over to the next car session (see onSessionDestroyed).

Parameters

callback

The callback implementation to register, or null to unregister