DEEPLINKX / app

OsmAnd

OsmAnd actions, setup, native platforms, and fallback options.

DeeplinkX 1.5.8 · Source

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.

ParameterTypeRequiredDefault
fallbackToStoreboolNofalse

Exact source

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.

ParameterTypeRequiredDefault
coordinateCoordinateYes—
zoomintNo15
fallbackToStoreboolNofalse

Exact source

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.

ParameterTypeRequiredDefault
destinationCoordinateYes—
fallbackToStoreboolNofalse

Exact source

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 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

  1. 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.
  2. If the app is missing and fallbackToStore is true, we redirect to the appropriate store listing.
  3. Otherwise the action falls back to https://osmand.net/map/ with the same coordinate.
  4. Set disableFallback: true when calling launchAction to skip both store and web fallbacks.

Fallback Support Matrix

ActionStore FallbackWeb Fallback
Open app✔️✔️ (website)
View map✔️✔️
Directions with coordinates✔️✔️