# CarAppFocusManager.OnAppFocusOwnershipCallback

# CarAppFocusManager.OnAppFocusOwnershipCallback

`
public
static


interface
CarAppFocusManager.OnAppFocusOwnershipCallback
`  
`


`

|------------------------------------------------------------|
| android.car.CarAppFocusManager.OnAppFocusOwnershipCallback |

<br />

*** ** * ** ***

Listener to get notification for app getting information on app type ownership loss.

## Summary

|                                                                                                                                   ### Public methods                                                                                                                                   ||
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onAppFocusOwnershipGranted](https://developer.android.com/reference/android/car/CarAppFocusManager.OnAppFocusOwnershipCallback#onAppFocusOwnershipGranted(int))`(int appType) ` Granted ownership for the focus, which happens when app has requested the focus. |
| ` abstract void` | ` `[onAppFocusOwnershipLost](https://developer.android.com/reference/android/car/CarAppFocusManager.OnAppFocusOwnershipCallback#onAppFocusOwnershipLost(int))`(int appType) ` Lost ownership for the focus, which happens when other app has set the focus.          |

## Public methods

### onAppFocusOwnershipGranted

```
public abstract void onAppFocusOwnershipGranted (int appType)
```

Granted ownership for the focus, which happens when app has requested the focus. The app getting focus can start the action associated with the focus. For example, navigation app can start navigation upon getting this for[CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION](https://developer.android.com/reference/android/car/CarAppFocusManager#APP_FOCUS_TYPE_NAVIGATION).

<br />

|                                                                                    Parameters                                                                                     ||
|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `appType` | `int`: Value is[CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION](https://developer.android.com/reference/android/car/CarAppFocusManager#APP_FOCUS_TYPE_NAVIGATION) <br /> |

### onAppFocusOwnershipLost

```
public abstract void onAppFocusOwnershipLost (int appType)
```

Lost ownership for the focus, which happens when other app has set the focus. The app losing focus should stop the action associated with the focus. For example, navigation app currently running active navigation should stop navigation upon getting this for[CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION](https://developer.android.com/reference/android/car/CarAppFocusManager#APP_FOCUS_TYPE_NAVIGATION).

<br />

|                                                                                    Parameters                                                                                     ||
|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `appType` | `int`: Value is[CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION](https://developer.android.com/reference/android/car/CarAppFocusManager#APP_FOCUS_TYPE_NAVIGATION) <br /> |