I'm an Android developer and I'm trying to develop a custom Android Auto app, that does a simple mirroring of the phone screen. I know that currently the API are only available for music and messaging apps, but I would write an app for mirror a simple "hello world". I follow the Google Getting Started tutorial and I'm using the Desktop Head Unit (DHU) provided by Google (at developer.android.com/training/auto/testing/index.html)
but when I tap last button on the bottom of the display and select "All car apps", my application doesn't appear on the list.
All car apps
For example, if Android Auto is launched in a Samsung tablet (SM-T555), the DHU lists these app:
com.google.android.gms, Maps, System UI, Video, SampleAuthenticatorService, SecureSampleAuthService, Screen capture, Android Auto, Phone, Media, Return to Google, Samsung Billing, Google App, Google Play Music, Music
Available Car Apps in a Samsung Tablet
How can I make an app that is displayed on the available app list in Android Auto? Is possible do mirroring for a custom app in Android Auto?
You can use some of your favorite apps with Android Auto, including services for music, messaging, news, and more. Check out some of the apps that are compatible with Android Auto. For more information or to troubleshoot these apps, visit their website or contact the developer directly.
You can develop a single app for iPhone, Android phones and tablets. iBuildApp App Builder software allows businesses to develop mobile apps in a matter of minutes, no coding required! Free Android apps, easy drag and drop, 1000s templates, 24/5 support and more.
Inside the Android Auto app, choose Customize Launcher > Add a shortcut to the launcher to do so. Select Call a contact to add a one-tap option to call anyone of your choosing. An Assistant action is an even more useful option.
Engineers who build Android Auto devices (like infotainment systems) and Android accessories (like smartphones) work with the AOA protocol.
Create a service like this:
public class HelloWorldService extends CarActivityService {
@Override
public Class<? extends CarActivity> getCarActivity() {
return HelloWorldAutoActivity.class;
}
}
Then add the service to your manifest like this:
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc" />
<service
android:name=".HelloWorldService"
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.google.android.gms.car.category.CATEGORY_PROJECTION" />
<category android:name="com.google.android.gms.car.category.CATEGORY_PROJECTION_OEM" />
</intent-filter>
</service>
Finally create a xml file called automotive_app_desc under your res folder:
<automotiveApp>
<uses name="service" />
<uses name="projection" />
<uses name="notification" />
</automotiveApp>
Your HelloWorldAutoActivity.class will work as your MainActivity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With