Configure the Communications Plugin

Last edit: 2023.10.19

The TomTom Digital Cockpit SDK is not available for general use.
Please contact us for more information.

The off-the-shelf communications plugin comes with a default configuration. This configuration provides a default behavior, such as closing the frontend when making an outgoing call. This configuration is based on the configuration-framework and can be changed if necessary. This guide explains how to make such changes.

For a code example, see the examples/communications/configuration directory.

Communications plugin default configuration

The communications plugin default configuration is defined as a resource file that contains configuration keys and their values. The following keys and values are defined in the communications plugin:

1<resources>
2 <!-- Indicates whether pairing with a Bluetooth device is restricted by the safety lock mode when available. By default it is set to true -->
3 <bool name="isBluetoothDevicePairingRestrictedBySafetyLockConfigKey">true</bool>
4 <!-- Indicates that the communications panel will be kept open when starting an outgoing call. By default it is set to false. -->
5 <bool name="keepCommunicationsPanelOpenOnOutgoingCallConfigKey">false</bool>
6 <!-- The timeout in milliseconds, which is started after the last received phone book synchronization batch update, indicating phone book synchronization has finished. By default it is set to 15000 milliseconds -->
7 <string name="phoneBookSynchronizationTimeoutMillisecondConfigKey">15000</string>
8 <!-- Indicates that the task process panel will not be instantiated for an ongoing call. By default it is set to false. -->
9 <bool name="suppressCallTaskProcessPanelConfigKey">false</bool>
10</resources>

Changing the communications plugin configuration

The communications plugin default configuration can be changed by adding a custom configuration resource file in your application, such as src/main/res/values/example-communication-configuration.xml, which then overrides the default values with the ones provided.

Configuring the frontend's behavior to allow it to start pairing with a Bluetooth device.

When the safety lock is available and enabled, the communications frontend will not show a button allowing it to start pairing with a Bluetooth device.

If you do want to allow the user to start pairing with a Bluetooth device when the safety lock is available and enabled, you can configure it by setting the isBluetoothDevicePairingRestrictedBySafetyLockConfigKey to false:

src/main/res/values/example-communication-configuration.xml

<bool name="isBluetoothDevicePairingRestrictedBySafetyLockConfigKey">false</bool>

Configuring the frontend's behavior when making an outgoing call

When an outgoing call is made, the communications frontend will be closed by default.

If you don't want to close the frontend provided with the off-the-shelf communications plugin, you can configure it by setting the keepCommunicationsPanelOpenOnOutgoingCallConfigKey to true:

src/main/res/values/example-communication-configuration.xml

<bool name="keepCommunicationsPanelOpenOnOutgoingCallConfigKey">true</bool>

Timeout indicating phone book synchronization has finished

The timeout is restarted after every phone book update, and when it triggers it is assumed that the phone book synchronization has finished. The timeout defaults to 15000 milliseconds.

If you want a different timeout, you can change the value of phoneBookSynchronizationTimeoutMillisecondConfigKey:

src/main/res/values/example-communication-configuration.xml

<string name="phoneBookSynchronizationTimeoutMillisecondConfigKey">20000</string>

Suppressing the task process panel for an ongoing call

By default, for an ongoing call the communications frontend shows a task process panel with the call information.

If you don't want this task process panel to show, you can configure it by setting the suppressCallTaskProcessPanelConfigKey to true:

src/main/res/values/example-communication-configuration.xml

<bool name="suppressCallTaskProcessPanelConfigKey">true</bool>