Package com.tomtom.ivi.platform.navappcomponents.api.common.util

Types

Link copied to clipboard
class InstanceLifecycleManager<T>(onCreateInstance: (context: Context) -> T, onDestroyInstance: (instance: T) -> Unit)

This class can be used to manage the lifecycle of an instance. onCreateInstance will be called to notify that an instance has been requested and should provide a new instance of T. onDestroyInstance will be called when all LifecycleOwners associated to an instance are destroyed.

Link copied to clipboard
object NavAppClientSdkProvider

Should be used to get an instance of NavAppClient when there is need to call one of its APIs. This class manages the lifecycle of NavApp ClientSDK client (NavAppClient) instances. getClientSdk should be used instead of manually instantiating NavAppClient. NavAppClient instances are costly to create and this class shares a single instance per process between callers. The returned instance will remain available until all LifecycleOwners that requested an instance are destroyed. NavAppClient.close should not be called directly.

Functions

Link copied to clipboard
fun Coordinate.toIviCoordinate(): Coordinate

Converts a NavAppCoordinate to a Coordinate.

Link copied to clipboard
fun Address.toNavAppAddress(): Address

Converts an Address to a NavAppAddress.

Link copied to clipboard
fun Coordinate.toNavAppCoordinate(): Coordinate

Converts a Coordinate to a NavAppCoordinate.