android - 连接到手机后,Android Auto 媒体应用程序如何显示?

标签 android android-auto

连接到手机后,Android Auto 媒体应用程序如何显示。

我实现了 Android 汽车媒体应用,添加 在 XML 中,

当我将手机连接到汽车时,我只能看到 google play 音乐应用,而不是我的自定义应用。是否也实现了 MediaBrowserService?

list 文件:`

<uses-permission android:name="android.permission.INTERNET" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

    <meta-data android:name="com.google.android.gms.car.application"
        android:resource="@xml/automotive_app_desc"/>

    <activity
        android:name=".Tunes"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionBar"
        android:screenOrientation="landscape">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

`

最佳答案

为了让您的应用出现在真车上,您的应用必须从 Google Play 商店安装。这意味着您必须将其提交给 Google 进行审核。然后他们签署 apk 并通过商店提供它。它还必须通过某些 Android Auto 要求才能放置在 Production 商店中。您可以通过 Alpha channel 提交该应用程序,如果它不完全符合所有标准,他们可能会临时批准您继续进行。这是它出现在实际汽车中的唯一方式。他们的要求在这里:https://developer.android.com/distribute/essentials/quality/auto.html

此外,一旦您的应用提交到应用商店,通常需要几个小时才能得到审核和批准。这使得快速测试/修复周期难以完成。

您还可以下载 Desktop Head Unit (DHU) 并在此模拟器中测试您的 Android Auto 应用,然后再将其提交到商店。更多信息在这里:https://developer.android.com/training/auto/testing/index.html .此模拟器不需要先对 apk 进行签名,因此您可以在将应用提交给 Google 之前快速测试/修复。

关于android - 连接到手机后,Android Auto 媒体应用程序如何显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35588232/

相关文章:

android - 在开发 Android 应用程序时使用 Linux 操作系统重要吗?

Android simplexml.jar混淆问题

android - Android Auto 应用程序验证问题

android - onLoadChildren 永远不会在 MediaBrowserServiceCompat 中被调用

android - 为什么包 "com.android.bluetooth"在三星设备上查询我们的 MediaBrowserService?

android - 使用 Flowable/Observable 时从 room @Query 生成错误的代码

android - Android中的postgres JDBC驱动程序

android - 如何在android P aosp模拟器上激活汽车数据功能

android - 如何判断android设备是否已关闭

android - Android Auto 中未列出的应用程序