SetupProxyActivity
An activity that checks the setup of the app before opening the target activity. The checks include:
Checking if all requested permissions are granted, and requesting them if not granted.
Checking if the app is the default dialer app, and requesting it when it is not.
Once the aforementioned checks pass, SetupProxyActivity starts the target activity as specified by the com.tomtom.ivi.platform.product.activity.META_DATA_KEY_TARGET_ACTIVITY_CLASS_NAME
meta-data entry of the proxy activity. The intent data is forwarded to the target activity. For example:
<meta-data
android:name="com.tomtom.ivi.platform.product.activity.META_DATA_KEY_TARGET_ACTIVITY_CLASS_NAME"
android:value="com.tomtom.ivi.platform.framework.api.product.defaultactivity.DefaultActivity" />
The proxy activity also needs to know the name of the application. The name must be provided in the proxy activity meta-data using com.tomtom.ivi.platform.debugpermissions.META_DATA_KEY_APPLICATION_NAME_RES_ID
as a key. For example:
<meta-data
android:name="com.tomtom.ivi.platform.debugpermissions.META_DATA_KEY_APPLICATION_NAME_RES_ID"
android:resource="@string/app_name" />
End-users should not need to grant permissions or confirm requests, as the app will run as a system app in the vehicle. However, during development we commonly do not run the app as a system app, in which case this activity helps the user to get into the app easily and prevents the need for troubleshooting when something isn't working, simply because the user forgot to grant a permission.