英文:
How do I get my (f-droid or locally built) Android app to show up in the Android Auto launcher?
问题
I am attempting to add Android Auto support to this open source audio recorder app. According to this page, all I need to do is add:
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc"/>
And set the minSdkVersion
to 23. I've done this, and created app/src/main/res/xml/automotive_app_desc.xml
with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<automotiveApp>
<uses name="media"/>
</automotiveApp>
I've also enabled Developer Mode in my Android Auto app, and I have "Unknown Sources" checked, but when I send a debug build of the app to my phone and plug my phone into my car, it doesn't show up.
By contrast, when I do a local build of AntennaPod, the debug version shows up just fine.
When I open up Android Auto and expand the "Version and Permissions Info", I get this:
Packages:
Audio Recorder: 3.5.15debug
AntennaPod: 3.0.2
AntennaPod Debug: 2.5.2
Maps: 11.77.0300
Google Play Store: 35.8.12-21 [0] [PR] 531622345
Messages: 10.1.40.41
Google Play services: 23.16.13 (100400-527363516)
Android Auto: 9.3.631434-release
... (more apps)
Permissions:
phone: on
contacts: on
location: on
sms: on
microphone: on
calendar: on
call_log: on
nearby_devices: off
Where (more apps)
expands to a list of the apps on my phone that show up in the Android Auto Launcher, so it seems that "Audio Recorder" is somehow registered with Android Auto, it's just not being displayed.
I thought this might be something to do with signing keys, but that seems unlikely given that I never set up any sort of signing keys for AntennaPod.
英文:
I am attempting to add Android Auto support to this open source audio recorder app. According to this page, all I need to do is add:
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc"/>
And set the minSdkVersion
to 23. I've done this, and created app/src/main/res/xml/automotive_app_desc.xml
with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<automotiveApp>
<uses name="media"/>
</automotiveApp>
I've also enabled Developer Mode in my Android Auto app, and I have "Unknown Sources" checked, but when I send a debug build of the app to my phone and plug my phone into my car, it doesn't show up.
By contrast, when I do a local build of AntennaPod, the debug version shows up just fine.
When I open up Android Auto and expand the "Version and Permissions Info", I get this:
Packages:
Audio Recorder: 3.5.15debug
AntennaPod: 3.0.2
AntennaPod Debug: 2.5.2
Maps: 11.77.0300
Google Play Store: 35.8.12-21 [0] [PR] 531622345
Messages: 10.1.40.41
Google Play services: 23.16.13 (100400-527363516)
Android Auto: 9.3.631434-release
... (more apps)
Permissions:
phone: on
contacts: on
location: on
sms: on
microphone: on
calendar: on
call_log: on
nearby_devices: off
Where (more apps)
expands to a list of the apps on my phone that show up in the Android Auto Launcher, so it seems that "Audio Recorder" is somehow registered with Android Auto, it's just not being displayed.
I thought this might be something to do with signing keys, but that seems unlikely given that I never set up any sort of signing keys for AntennaPod.
答案1
得分: 1
已经实现了MediaBrowserService
并添加了相应的清单声明吗?
英文:
Have you also implemented a MediaBrowserService
and added the corresponding manifest declarations for it?
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论