public abstract class CarAppService
extends Service

   ↳ android.content.Context
     ↳ android.content.ContextWrapper

The base class for implementing a car app that runs in the car.

Service Declaration

The app must extend the CarAppService to be bound by the car host. The service must also respond to Intent actions coming from the host, by adding an intent-filter to the service in the AndroidManifest.xml that handles the SERVICE_INTERFACE action. The app must also declare what category of application it is (e.g. CATEGORY_NAVIGATION_APP). For example:
     <action android:name="" />
     <category android:name=""/>

For a list of all the supported categories see Supported App Categories.

Accessing Location

When the app is running in the car display, the system will not consider it as being in the foreground, and hence it will be considered in the background for the purpose of retrieving location as described here.

To reliably get location for your car app, we recommended that you use a foreground service. If you have a service other than your CarAppService that accesses location, run the service and your `CarAppService` in the same process. Also note that accessing location may become unreliable when the phone is in the battery saver mode.




Used to declare that this app is a charging app in the manifest.


Used to declare that this app is a navigation app in the manifest.


Used to declare that this app is a parking app in the manifest.


The full qualified name of the CarAppService class.

Inherited constants

Public constructors


Public methods

abstract HostValidator createHostValidator()

Returns the HostValidator this service will use to accept or reject host connections.

final void dump(FileDescriptor fd, PrintWriter writer, String[] args)
final Session getCurrentSession()

Returns the current Session for this service.

final HostInfo getHostInfo()

Returns information about the host attached to this service.

final IBinder onBind(Intent intent)

Handles the host binding to this car app.

abstract Session onCreateSession()

Creates a new Session for the application.

final boolean onUnbind(Intent intent)

Handles the host unbinding from this car app.

Inherited methods