@IviExperimental(reasons = [])
data class PolicyProvider(val compareItemsPolicy: MediaItemComparisonPolicy = DefaultMediaItemComparisonPolicy(), val itemMappingPolicy: MediaItemMappingPolicy = DefaultMediaItemMappingPolicy(), val sourceAttributionPolicy: MediaSourceAttributionPolicy = DefaultMediaSourceAttributionPolicy(), val mediaControlPolicy: MediaControlPolicy = DefaultMediaControlPolicy(), val collectionPolicy: CollectionPolicy = DefaultCollectionPolicy(), 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 collection and allows managing actions on a collection.


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
constructor(compareItemsPolicy: MediaItemComparisonPolicy = DefaultMediaItemComparisonPolicy(), itemMappingPolicy: MediaItemMappingPolicy = DefaultMediaItemMappingPolicy(), sourceAttributionPolicy: MediaSourceAttributionPolicy = DefaultMediaSourceAttributionPolicy(), mediaControlPolicy: MediaControlPolicy = DefaultMediaControlPolicy(), collectionPolicy: CollectionPolicy = DefaultCollectionPolicy(), userFlowPolicy: UserFlowPolicy = UserFlowPolicy(), sourceDefinitionPolicy: SourceDefinitionPolicy = DefaultSourceDefinitionPolicy())