Automotive Navigation Application

Core concepts

Request access

Overview

The Client Integration Library (CIL) follows a client-server architecture.

Key architectural components:

  • NavAppClient: Your main entry point for all CIL functionality
  • Managers: Specialized components for different features (TripManager, GuidanceManager, etc.)
  • Callbacks: Asynchronous handlers for receiving responses and updates

All operations are asynchronous, ensuring your application remains responsive while the application processes navigation requests.

The CIL uses AIDL (Android Interface Definition Language) based IPC (Inter-Process Communication) internally to enable communication between the client application and the navigation server process.

API Version

API Version is an integer value that uniquely identifies the framework API revision offered by a version of the CIL. Each API in the CIL is marked with an API version denoting in which version this API was introduced. Note the API version does not denote the CIL release version, but only the implemented and supported APIs. If the version is unreleased the API is not yet frozen and may change in subsequent releases. See SdkBuild.Version.API_LEVEL for the current version of the client library.

@Since(ApiVersions.VERSION_10)
fun getMapManagementManager(): MapManagementManager

Minimum client API Version

The ANA server is backwards compatible with clients that implement an older API version. Before version 9, this compatibility extended to every previously released API version.

Starting with version 9 however, compatibility with certain older API versions has been dropped. The minimum supported API version of clients is now specified, and will increase every time a breaking change is made. Clients using an older API version, will be unable to connect.

See SdkBuild.Version.MINIMUM_CLIENT_API_LEVEL for the currently applicable minimum client api version of the client library.

Manager-based organization

CIL organizes functionality into specialized managers, each responsible for a specific domain of navigation features.

Available managers

ManagerPurpose
TripManagerPlan routes, manage trips, start and stop navigation
GuidanceManagerReceive turn-by-turn instructions, lane guidance, and arrival information
SearchManagerSearch for locations, POIs, and addresses
MapDisplayManagerControl map camera, zoom levels, and display modes
CurrentPositionManagerTrack vehicle position updates
PersonalLocationsManagerManage favorites, recent destinations, home, and work locations
HorizonManagerReceive upcoming road events for ADAS integration
MapManagementManagerRetrieve information about installed onboard maps
AssetManagerFetch drawable resources like road shields and icons
SettingsManagerRead and write navigation settings

Accessing managers

Each manager is accessed through the NavAppClient:

val tripManager = navAppClient.getTripManager()
val guidanceManager = navAppClient.getGuidanceManager()
val searchManager = navAppClient.getSearchManager()
val currentPositionManager = navAppClient.getCurrentPositionManager()
// etc.

Managers are lightweight objects that can be retrieved multiple times.

Callbacks, listeners and releasables

SdkReleasable

Every API call in the CIL returns an SdkReleasable object. This represents the active operation and provides lifecycle control. This allows a client to release resources associated with performed actions and/or to stop receiving updates through callbacks.

Callback types

CIL uses two main callback patterns depending on the operation type.

One-shot callbacks

Used for single operations that complete once, such as planning a trip or performing a search.

tripManager.planTrip(
parameters = parameters,
callback = object : TripPlanningCallback {
override fun onTripPlanned(response: Result<TripPlanningResponse, TripPlanningFailure>) {
// Handle trip planning result
}
override fun onFunctionalityUnavailable(reason: Callback.Reason) {
// Handle unavailability
}
}
)

Listener callbacks

Used for continuous updates that occur multiple times, such as receiving navigation instructions or position changes.

guidanceManager.observeNextInstruction(
object : NextInstructionListener {
override fun onNextInstructionChange(instructionInfo: InstructionInfo) {
// Receives updates as instructions change during navigation
}
override fun onFunctionalityUnavailable(reason: Callback.Reason) {
// Handle unavailability
}
}
)