QuickAccessItem
Represents a quick access destination item for Android Auto display.
This is a clean data class with no dependencies on app-side modules, making it suitable for inclusion in the MSDK. It provides a unified representation for Home, Work, and Recent destination addresses.
Purpose
Abstraction: Decouples Android Auto quick access UI from specific data types
MSDK-ready: No dependencies on app-side modules like
favorites_address_domainUnified: Single type for Home, Work, and Recent destinations
Usage
The app's QuickAccessProvider implementation converts its internal types (e.g., FavoriteAddress, RecentDestination) to this class:
fun FavoriteAddress.toQuickAccessItem(type: QuickAccessType) = QuickAccessItem(
id = "favorite_$id",
title = name,
subtitle = address.addressLabel,
latitude = address.coordinates.latitude(),
longitude = address.coordinates.longitude(),
type = type
)Android Auto Display
Quick access items appear at the top of the search screen when the query is empty:
Home: Appears with home icon for instant navigation to home address
Work: Appears with work icon for instant navigation to work address
Recent: List of last navigated destinations (max 5, 30-day expiration)