You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Android Studio中为车载POI应用配置Manifest的appCategory

基于POI的车载应用所需的appCategory参数疑问

我想了解开发基于POI的车载应用时,需要设置什么appCategory参数——目前开发者文档里没有明确指定这个参数的取值。我已经尝试按照文档建议,将appCategory设为maps,同时把CarAppService的category设置为POI,以下是我使用的Manifest文件内容:

<application
    android:allowBackup="false"
    android:appCategory="maps"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:usesCleartextTraffic="true"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true">

    <meta-data
        android:name="com.android.automotive"
        android:resource="@xml/automotive_app_desc" />

    <meta-data
        android:name="androidx.car.app.minCarApiLevel"
        android:value="1" />

    <service
        android:name=".MyNavigationCarAppService"
        android:exported="true">
        <intent-filter>
            <action android:name="androidx.car.app.CarAppService" />
            <category android:name="androidx.car.app.category.POI" />
        </intent-filter>
    </service>

    <activity
        android:name="androidx.car.app.activity.CarAppActivity"
        android:exported="true"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:theme="@android:style/Theme.DeviceDefault.NoActionBar">

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

        <meta-data
            android:name="distractionOptimized"
            android:value="true" />

    </activity>

</application>

使用的依赖如下:

implementation 'androidx.car.app:app:1.3.0-beta01'
implementation 'androidx.car.app:app-automotive:1.3.0-beta01'

内容的提问来源于stack exchange,提问作者Shailesh Saindane

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 12:58:29