Frequently Asked Questions (FAQ)
When building, there are a lot of unresolved dependencies
Missing credentials
For example, when you get the following compilation errors, then your Nexus credentials may be stored incorrectly or are missing.
1Execution failed for task ':buildSrc:compileKotlin'.2> Could not resolve all files for configuration ':buildSrc:compileClasspath'.3 > Could not find com.tomtom.ivi.platform.gradle:api_framework_config:1.0.2264.4 Searched in the following locations:5 etc...
Check that you have stored the credentials properly in file ~/.gradle/gradle.properties
.
Windows: File %UserProfile%\.gradle\gradle.properties
Note: The username and password should not be surrounded by quotation marks.
Note: On some operating systems, a hash character #
in the username or password must be
escaped as \#
to be properly recognized.
If your credentials are properly stored, then the environment variable GRADLE_USER_HOME
may point
to a directory other than ~/.gradle/
. Check this environment variable and move your
gradle.properties
file to the correct location. You can check where it points to during the build
when compiling with --debug
and look in the logs for Gradle user home:
Windows: Folder %UserProfile%\.gradle\
Incorrect Nexus repository credentials
If your build output contains Received status code 401 from server: Unauthorized
, then Gradle does
find the credentials, but the server rejects them. So the credentials are incorrect.
For example:
> Could not GET 'https://repo.tomtom.com/repository/ivi/com/tomtom/ivi/gradle/api_plugins_platform/1.0.1859/api_plugins_platform-1.0.1859.pom'. Received status code 401 from server: Unauthorized
There is no map and/or search does not work
TomTom Digital Cockpit uses an on-board map for its navigation features, but this map is not included in the SDK package or in the emulator image. You must download and install the map separately, as explained in Accessing the Map Data.
The demo maps cover a limited area only. Outside this area, TomTom Digital Cockpit does not show map details, nor can it find a location or calculate a route.
If you need a map for an area not included in these demo maps, please ask your TomTom representative.
How do I open/close the Debug Menu?
Refer to the explanation on The Debug Menu.
How do I start a Route Demo?
A route demo is a simulation of a drive along a currently planned route on the device, this may be useful to see what happens at the various points along the route, without the need to go for an actual drive.
To plan a route, long press on any point on the map, and a route will be planned from the current position, to this location.
In order to allow position simulation, you first need to enable Developer Options in Android:
- On the emulator, go to the
Settings
menu:- Press the Home button (the circle in the sidebar outside the emulator screen).
- Select
Car Launcher as Home
>Just Once
. - Press the Android application icon (nine dots in a grid) at the bottom of the screen.
- Scroll down and open
Settings
.
- Scroll down and open
System
, then openAbout
. - Find
Build number
and tap this seven times, after which aYou are now a developer!
toast appears to confirm that developer options are enabled.
Enable location mocking:
- Go back to the System menu and scroll down to
Developer options
. - Scroll down and select
Select mock location app
. - Select
IVI Example
. - This setting is persistent until you uninstall the application.
Cold boot the emulator, as explained in the How to cold boot the emulator? section.
Start a Route Demo:
- Make sure a route has been planned.
- Tap on the chevron (current position indicator). The
Trip Preview
panel is shown. - Tap on the
Play
button in theTrip Preview
panel to start the route demo. - You can change the vehicle speed by selecting the
1x
,2x
, or3x
buttons. - Tap on the chevron again to hide the
Trip Preview
panel.
I am using a Mac(book) with an M1 chip and cannot start the Android emulator
Attempting to start the Android emulator results in:
The emulator process for AVD Digital Cockpit_Emulator was killed.
and installing the emulator accelerator package from the Android Update Site results in:
Your CPU does not support VT-x. Unfortunately, your computer does not support hardware accelerated virtualization.
The Apple M1 processor is not an Intel-based chip and the hardware-accelerated virtualization package does not work on this processor architecture. Special setup is required to get even the default Android emulator working, so this is not just a TomTom Digital Cockpit-specific problem. Official Android support for this chip is still in progress.
The previous instructions on how to configure an Android Virtual Device, specify exceptions for computers with the M1 processor. Please verify that you have followed those exceptions.
I get an insufficient storage error when installing the APK
You may encounter an INSTALL_FAILED_INSUFFICIENT_STORAGE
error when installing the APK on the
emulator. Ensure that the emulator AVD has sufficient disk storage configured:
- In Android Studio open the AVD Manager via
Tools
>AVD Manager
. - Edit the TomTom Digital Cockpit AVD by clicking its pencil icon in the
Actions
column. - Click
Show Advanced Settings
and scroll down to theMemory and Storage
section. Ensure these fields have at least the following values:RAM
:3072 MB
VM heap
:192 MB
Internal Storage
:4096 MB
- Click
Finish
.
Cold boot the emulator, as explained in the How to cold boot the emulator? section.
The Android emulator is slow at starting
The emulator may be slow at starting up on some configurations, especially the first time and especially on an Apple Mac.
Locate the config.ini
file for the AVD you are using for running TomTom Digital Cockpit in the emulator.
If you have followed the instructions in
The TomTom Digital Cockpit Emulator, it should
be at the following location:
Linux or Mac: ~/.android/avd/Digital Cockpit_Test_Device_API_30.avd/config.ini
Windows: %UserProfile%\.android\avd\Digital Cockpit_Test_Device_API_30.avd\config.ini
Otherwise it could be in one of the other .avd
directories at that location.
When you have found the config.ini
file, you can try a few things:
- Try disabling sound, as it may cause the emulator to generate a high CPU load:
hw.audioInput=nohw.audioOutput=no
- Check that you have sufficient RAM:
hw.ramSize=3072
How do I cold boot the emulator?
In some situation a cold boot of the emulator is required, for example after changing its configuration, or as a precaution when unexpected behavior occurs.
To cold boot the emulator, follow these steps:
- If the emulator is running, click the
x
in the upper-right corner of the emulator sidebar. - In Android Studio go to:
Tools
>AVD Manager
. - On the right-hand side of each configured AVD there is a down-arrow that launches a context menu.
Press the down-arrow (instead of pressing the green Play button), and select
Cold Boot Now
.
Now wait for the emulator to start up.
I get RuntimeException: Required support for OpenGL standard derivatives is missing
When you launch the application on emulator, it crashes and restarts in a never-ending loop. Look in the logcat and if you get the following error, you need to set the emulator's OpenGL ES API level to 3.1:
1com.tomtom.ivi.example.product.exampleapp E/AndroidRuntime: FATAL EXCEPTION: GLThread 6672 Process: com.tomtom.ivi.example.product.exampleapp, PID: 57053 java.lang.RuntimeException: Required support for OpenGL standard derivatives is missing.4 at com.tomtom.navkit.map.TomTomNavKitMapJNI.SurfaceAdapter_onSurfaceCreated(Native Method)5 at com.tomtom.navkit.map.SurfaceAdapter.onSurfaceCreated(SurfaceAdapter.java:170)6 at com.tomtom.navkit.map.sdk.MapView$Renderer.onSurfaceCreated(MapView.java:320)7 at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1541)8 at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1272)
To fix this, set the emulator's OpenGL ES API level to 3.1 and restart the emulator, as explained in
The TomTom Digital Cockpit emulator device
under Set the Emulator's OpenGL
and Now restart the emulator
.
Android Studio does not install the application
Sometimes Android Studio does not install your new application after a rebuild but instead launches a previously installed version present on the emulator or target device. To solve this, enable the package manager to handle installs:
- Open the
Run/Debug Configurations
dialog viaRun
>Edit Configurations...
. - In this dialog tick the box
Always install with package manager
. - Set field
Install Flags
to-r -g
, to always reinstall the apk (-r
) and to grant all permissions requested in the manifest file (-g
). See also the ADB Package Manager documentation.
Configuration Run IVI Template app
as delivered with the SDK has these settings pre-configured.
For the example applications you can configure this yourself, if needed.
How do I install the APK onto a custom device?
Some features of the TomTom Digital Cockpit example application require system permissions. For instance, you won't be able to play music using Spotify nor use HVAC features. If you want to install the example app on a different emulator or device, you need to make sure that it is signed with the corresponding platform key.
The TomTom Digital Cockpit platform debug key and password files, used for the pre-created tablet and
emulator images, are in the
keystore
directory in the example source. Drop in your own platform keys, replacing the existing ones in that
directory, then rebuild and deploy.
Android doesn't allow my application while driving
An IVI application must tag all its activities to be Distraction Optimized; see more about
driver distraction guidelines.
To do this, add the distractionOptimized
meta-data attribute in the AndroidManifest.xml
for all
activities and activity aliases. Also see IviActivity
.
I do not get a notification when an incoming call is received
To be informed by the platform about an incoming call, the IVI application needs to be configured as the system dialer. For example when the stock implementation of the telecom service is used, the command to register it as the platform system dialer is:
adb shell telecom set-system-dialer <IVI Application Package Name>/com.tomtom.ivi.platform.telecom.plugin.service.telecom.IviInCallService