DebugMenuActivity
An activity that hosts only the debug menu frontend. When it is launched on a secondary display it provides the possibility to interact with debug tabs while keeping the screen of the main activity (target activity) free from the debug menu.
To use this activity declare it in AndroidManifest.xml
of your app, as in the example:
<activity
android:name="com.tomtom.ivi.core.debug.activity.DebugMenuActivity"
android:exported="false"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="com.example.mydigitalcockpitapp.DEBUG_MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="com.tomtom.ivi.platform.framework.api.product.activity.IVI_INSTANCE"
android:value="Default" />
<meta-data
android:name="com.tomtom.ivi.platform.debug.api.product.debugmenuactivity.FRONTEND_METADATA_IDS"
android:value="com.tomtom.ivi.platform.debug.plugin.frontend.debug.Debug, ..." />
</activity>
Intent filter
The activity can be launched from the debug menu of your main activity, from the Display
tab. To launch this activity from the Display
debug tab implicit intent is used with an action com.example.mydigitalcockpitapp.DEBUG_MENU
. To make it work, declare an appropriate intent filter, as shown in the example above.
IVI instance ID
The activity uses the IviInstanceId as specified in a metadata entry with the key com.tomtom.ivi.platform.framework.api.product.activity.IVI_INSTANCE
. The value should match the instance id of the target activity. By doing so, all global and multiple-instance services are shared between target activity and DebugMenuActivity, enabling the interaction between the two.
Frontends
The debug menu activity filters the frontends as configured for the IVI instance ID. The filtering is based on the frontend metadata IDs as specified in the meta-data entry with the key com.tomtom.ivi.platform.debug.api.product.debugmenuactivity.FRONTEND_METADATA_IDS
. The value should be a comma separated list of frontend metadata IDs. The frontend metadata IDs can be obtained from the generated IviBuildConfig.kt
file in the Gradle module that configures the IVI application.