data class PolicyProvider(    val compareItemsPolicy: MediaItemComparisonPolicy = DefaultMediaItemComparisonPolicy(),     val itemMappingPolicy: MediaItemMappingPolicy = DefaultMediaItemMappingPolicy(),     val sourceAttributionPolicy: MediaSourceAttributionPolicy = DefaultMediaSourceAttributionPolicy(),     val mediaControlPolicy: MediaControlPolicy = DefaultMediaControlPolicy(),     val isPlaylistItemPolicy: IsPlaylistItemPolicy? = null,     val userFlowPolicy: UserFlowPolicy = UserFlowPolicy(),     val sourceDefinitionPolicy: SourceDefinitionPolicy = DefaultSourceDefinitionPolicy())

A container of customization policies for a media source.

Each customization policy is a short algorithm to perform a specific action that may be different across media sources.

All of the fields are optional and can be left to their default values, which will then use the policy used by the stock fallbackMediaPolicyFrontendExtension.

Examples: All example apps can be found in the Android Studio project inside the TomTom Digital Cockpit SDK.

  • How to add custom policies for a media source: examples/media/custompolicies/

  • How to change the fallback media policy: examples/media/fallbackpolicy/

  • How to customize the media source browsing user flow to show a custom panel: examples/media/userflowpolicy/



A policy to compare two media items.


A policy to modify data in media items before displaying them.


A policy to customize source attributions, such as logos.


The policy that configures the available media controls.


The policy that determines if the media item represents a playlist. Leave it null to use the default policy.


A policy to customize a source's user flows, such as logging in, browsing a source and accessing settings.


A policy to define some general traits of a source.


Link copied to clipboard
fun PolicyProvider(    compareItemsPolicy: MediaItemComparisonPolicy = DefaultMediaItemComparisonPolicy(),     itemMappingPolicy: MediaItemMappingPolicy = DefaultMediaItemMappingPolicy(),     sourceAttributionPolicy: MediaSourceAttributionPolicy = DefaultMediaSourceAttributionPolicy(),     mediaControlPolicy: MediaControlPolicy = DefaultMediaControlPolicy(),     isPlaylistItemPolicy: IsPlaylistItemPolicy? = null,     userFlowPolicy: UserFlowPolicy = UserFlowPolicy(),     sourceDefinitionPolicy: SourceDefinitionPolicy = DefaultSourceDefinitionPolicy())


Link copied to clipboard
val compareItemsPolicy: MediaItemComparisonPolicy
Link copied to clipboard
val isPlaylistItemPolicy: IsPlaylistItemPolicy? = null
Link copied to clipboard
val itemMappingPolicy: MediaItemMappingPolicy
Link copied to clipboard
val mediaControlPolicy: MediaControlPolicy
Link copied to clipboard
Link copied to clipboard
val sourceDefinitionPolicy: SourceDefinitionPolicy
Link copied to clipboard
val userFlowPolicy: UserFlowPolicy