Platforms and setup
Native platforms: ios, android.
- Android requests target the free OsmAnd package.
- iOS actions use HTTPS links. Browser directions may require selecting a start point; origin, travel mode, waypoints and text-only directions are not exposed.
Public actions
OsmAnd.open
factory OsmAnd.open({final bool fallbackToStore = false})
Launch with DeeplinkX.launchApp. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.
| Parameter | Type | Required | Default |
|---|---|---|---|
fallbackToStore | bool | No | false |
OsmAnd.view
static OsmAndViewAction view({ required final Coordinate coordinate, final int zoom = 15, final bool fallbackToStore = false, })
Launch with DeeplinkX.launchAction. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.
| Parameter | Type | Required | Default |
|---|---|---|---|
coordinate | Coordinate | Yes | — |
zoom | int | No | 15 |
fallbackToStore | bool | No | false |
OsmAnd.directionsWithCoords
static OsmAndDirectionsWithCoordsAction directionsWithCoords({ required final Coordinate destination, final bool fallbackToStore = false, })
Launch with DeeplinkX.launchAction. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.
| Parameter | Type | Required | Default |
|---|---|---|---|
destination | Coordinate | Yes | — |
fallbackToStore | bool | No | false |
Provider setup and examples
DeeplinkX exposes OsmAnd app opening, map viewing, and coordinate directions using package-targeted Android intents and HTTPS map links for iOS.
First-party References
- OsmAnd intents documentation
- OsmAnd web-map links
- OsmAnd web navigation
- Google Play listing
- Apple App Store listing
- Android intent registration and intent handling
- iOS link parsing, URL recognition, and scheme registration
OsmAnd uses package-targeted Android intents and HTTPS links for iOS map and route actions.
Available Actions
Launch OsmAnd
final deeplinkX = DeeplinkX();
await deeplinkX.launchApp(OsmAnd.open());
View Map
await deeplinkX.launchAction(
OsmAnd.view(
coordinate: const Coordinate(latitude: 52.516275, longitude: 13.377704),
zoom: 12,
),
);
Directions With Coordinates
await deeplinkX.launchAction(
OsmAnd.directionsWithCoords(
destination: const Coordinate(latitude: 52.516275, longitude: 13.377704),
),
);
The native request uses the destination and leaves the start point to OsmAnd's current-location/default handling. DeeplinkX does not expose an origin, travel mode, waypoints, or text-only directions action for this integration, even though OsmAnd itself supports additional capabilities. The browser fallback preselects the destination; the user may need to select a start point before a route can be calculated.
Platform Configuration
iOS
Add the OsmAnd scheme to the LSApplicationQueriesSchemes array in ios/Runner/Info.plist:
<string>osmandmaps</string>
The legacy scheme is used for installation detection and open(). If detection fails, DeeplinkX follows the selected store/web fallback policy; native-only requests return false when no native handoff succeeds.
Navigation actions send HTTPS links. The current iOS parser uses end for the destination; published web links use finish, so the native route request supplies both with the same coordinate. It omits start/profile/waypoint parameters. Native interception depends on operating-system settings and the installed app version; it is not guaranteed. Unsupported web parameters may be ignored, with finish retaining the browser destination.
Android
Allow querying the package in android/app/src/main/AndroidManifest.xml:
<queries>
<package android:name="net.osmand" />
</queries>
This provider targets the free Android app net.osmand, not the separate OsmAnd+ package net.osmand.plus. Both actions specify action_view and FLAG_ACTIVITY_NEW_TASK (0x10000000). The unchanged platform adapter may retry without package targeting if resolution fails; this integration does not promise strict targeting in every failure case.
URI Formats
- iOS view map and view fallback:
https://osmand.net/map/?pin={latitude},{longitude}#{zoom}/{latitude}/{longitude} - Android view map intent data:
https://osmand.net/go?lat={latitude}&lon={longitude}&z={zoom} - iOS directions with coordinates:
https://osmand.net/map/?end={latitude},{longitude}&finish={latitude},{longitude}#15/{latitude}/{longitude} - Android directions intent data:
osmand.navigation:q={latitude},{longitude} - Directions web fallback:
https://osmand.net/map/?finish={latitude},{longitude}#15/{latitude}/{longitude}
The default view zoom is 15. Coordinates and query values are serialized with Dart's URI builder; zoom handling remains the receiving client's responsibility.
Fallback Behavior
- After installation detection succeeds, Android actions attempt the package-targeted intent; iOS actions request the HTTPS link and rely on native interception or browser handling.
- If the app is missing and
fallbackToStoreistrue, we redirect to the appropriate store listing. - Otherwise the action falls back to
https://osmand.net/map/with the same coordinate. - Set
disableFallback: truewhen callinglaunchActionto skip both store and web fallbacks.
Fallback Support Matrix
| Action | Store Fallback | Web Fallback |
|---|---|---|
| Open app | ✔️ | ✔️ (website) |
| View map | ✔️ | ✔️ |
| Directions with coordinates | ✔️ | ✔️ |