Introduction
This NextBillion.ai’s Android Offline Navigation SDK lets applications download regional road-network data and map tiles so route calculation, map matching, navigation, and map rendering can continue with limited or no connectivity. This guide explains the required SDK setup, data components, region workflow, download lifecycle, routing behavior, and release configuration for Android apps.
Before we install the SDK, let’s verify the requirements for using it:
Requirements and Prerequisites
- NextBillion.ai Navigation Android SDK 3.0.1.
- Android 6.0 / API 23 or later.
- Valid NextBillion.ai access key with Maps, Navigation, and Offline Navigation permissions.
Integration Components
Offline navigation consists of two independent subsystems. Road-network data supports offline routing, re-routing, and navigation matching, while map data provides the offline basemap. NBNavigation coordinates both data types through the same regionId, but download and control operations are not transactions across the two subsystems.
| Component | Purpose | Availability requirement |
|---|---|---|
routeNetwork | Regional road network | Available for offline routing when its status is COMPLETED |
mapTile | Offline map | Available as an offline basemap when its status is COMPLETED |
| Complete regional package | Full offline navigation experience | Both subtasks are COMPLETED |
Offline-navigation application code should call only NBNavigation. It is the single, public entry point for regional offline navigation. NBNavigation coordinates the route-network engine and the Maps SDK regional-offline component. Do not create a second application-level downloader or directly manage SDK storage directories.
Route-network and map-tile operations are coordinated but are not transactional. One subsystem may succeed while the other fails or remains incomplete. Treat each subtask independently and use observeOfflineProgress() as the source of truth for final availability
Both components use the same regionId, but they are downloaded and tracked separately. A full offline navigation experience requires both datasets to reach COMPLETED.
Before You Start
Before integrating Android Offline Navigation, make sure that:
- Add the required Navigation SDK and Maps SDK packages.
- Your NextBillion.ai access key has Maps, Navigation, and Offline Navigation permissions enabled.
- The application initializes the Maps SDK with
NGLTomTombefore initializing Offline Navigation. - The application uses
NBNavigationas the single public entry point for offline navigation APIs. - You have planned the initial route mode, download network policy, and Android permission prompts needed by your navigation flow.
Check out the repo Nextbillion.ai Offline Navigation Android Demo for integrating the Offline Navigation SDK into a reference application. Please note that the repository uses the published Navigation SDK dependency rather than Navigation SDK source modules. Refer to the SDK version declared in gradle.properties and use the version provisioned for your deployment.