Added in API level 29

CarAppFocusManager.OnAppFocusChangedListener

public static interface CarAppFocusManager.OnAppFocusChangedListener

android.car.CarAppFocusManager.OnAppFocusChangedListener


Listener to get notification for app getting information on application type status changes.

Summary

Public methods

abstract void onAppFocusChanged(int appType, boolean active)

Application focus has changed.

Public methods

onAppFocusChanged

Added in API level 29
public abstract void onAppFocusChanged (int appType, 
                boolean active)

Application focus has changed. Note that CarAppFocusManager instance causing the change will not get this notification.

Note that this call can happen for app focus grant, release, and ownership change.

Parameters
appType int: appType where the focus change has happened. Value is CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION

active boolean: true if there is an active owner for the focus.