【发布时间】:2022-11-11 10:39:51
【问题描述】:
我正在开发一个 AAOS(Android 汽车操作系统)平台。操作系统版本为 10。
我在我的 car_product/build/car.mk 中包含“DirectRenderingCluster”作为
PRODUCT_PACKAGES += DirectRenderingCluster。
在这个App中,有一个ClusterRenderingService,它实现了InstrumentClusterRenderingService。
在 InstrumentClusterRenderingService 中,它会尝试从 PackageManager 中收集合适的导航 App 的一些信息。最初,它会在 EmbeddedKitchenSinkApp 中选择FakeClusterNavigationActivity。
我想用我自己的导航应用程序替换 FakeClusterNavigationActivity。 我模仿它并进行了类似的活动。 但是,我在InstrumentClusterRenderingService 的第 153 行和第 299 行收到错误消息。
我想念什么?我应该怎么做才能让 Car 服务识别我的 App 是符合条件的集群导航 App?谢谢你。
我的 AndroidManifest.xml 如下所示。 targetSdkVersion 为 29。
<manifest
package="com.mytest.android"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionName="1.0"
android:versionCode="1"
android:installLocation="auto"
android:sharedUserId="android.uid.system">
<application
android:hardwareAccelerated="true"
android:directBootAware="true"
android:persistent="false"
android:name="com.mytest.android.NaviApp"
android:label="@string/application_label"
android:icon="@drawable/icon">
<!-- Activity for cluster. Note that this is not the only activity in this App. -->
<activity android:process=":map_surface"
android:name=".MapSurfaceActivity"
android:label="MapSurfaceActivity"
android:screenOrientation="landscape"
android:launchMode="singleInstance"
android:allowEmbedded="true"
android:exported="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.car.cluster.NAVIGATION"/>
</intent-filter>
</activity>
<!-- Content provider for images (fake, not functional) -->
<provider android:name=".cluster.ClusterContentProvider"
android:authorities="com.mytest.android.cluster.clustercontentprovider"
android:grantUriPermissions="true"
android:exported="true"/>
【问题讨论】:
标签: android android-automotive