Skip to main content
Version: 1.x (beta)

Getting started

The Wemap SDKs provide comprehensive location tracking, routing, and navigation capabilities for mobile applications. This guide will help you get started with the SDKs, focusing on the positioning package.

Overview

The Wemap SDKs are organized into several libraries:

Requirements

Different Wemap SDKs have different requirements, but these are the common requirements applied to all of them.

  • Android SDK 23 or newer (Android 6.0 or newer) — 24 for the GeoAR and VPS SDKs
  • Kotlin 2.2 or newer
  • Java 11 or newer for source and target compatibility (the GeoAR SDK requires Java 17)

Installation

Before you start developing your application with WemapSDKs, you need to add the SDK as a dependency.

Adding the Dependency

To add WemapSDKs to your app:

  1. Wemap provides WemapSDKs via Maven Repository. Specify it in project/settings.gradle

    dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
    google()
    mavenCentral()
    // Wemap Maven repository
    maven {
    url "https://s3.eu-west-1.amazonaws.com/mobile.getwemap.com/releases/android"
    }
    }
    }
  2. In your module-level Gradle file (usually project/module/build.gradle.kts or project/module/build.gradle), add the required WemapSDK dependency to your app:

    dependencies {
    // to use Wemap custom interactive maps
    implementation "com.getwemap.sdk:map:<version>"
    // add this too if your UI is Jetpack Compose — see Documentation/mapsdk-compose.md
    implementation "com.getwemap.sdk:map-compose:<version>"

    // to use Wemap GeoAR for navigation
    implementation "com.getwemap.sdk:geo-ar:<version>"
    // add this too if your UI is Jetpack Compose — see Documentation/geoarsdk-compose.md
    implementation "com.getwemap.sdk:geo-ar-compose:<version>"

    // Add the dependency for the WemapPositioningSDK library
    implementation "com.getwemap.sdk.positioning:wemap-vps-arcore:<version>" // Wemap VPS ARCore Location Source (best for indoor)
    implementation "com.getwemap.sdk.positioning:android-fused-adaptive:<version>" // Adaptive Fused Location Source (Google or system, best for outdoor)
    }
  3. Ensure that your project's minSdk version is set to API 23 or higher (24 if you use the GeoAR SDK or either VPS positioning source):

    android {
    ...
    defaultConfig {
    minSdk 23
    }
    }
  4. Since you've modified your Gradle files, Android Studio will prompt you to sync the Gradle files. Proceed with syncing.

Creating a Session

Every Wemap SDK is driven by a session. A session loads a map's data once and owns the shared state the SDKs build on (routing, POIs, positioning). Create one session and pass it to each component you use — the shared instance is what keeps navigation, POI selection, and user location consistent across the map, AR, and positioning SDKs.

You must have a mapId and token to create a session. For more details, please contact the Wemap team.

create is a suspending function (it fetches the map from the backend), so call it from a coroutine. Below are examples of how to create a session using different SDKs.

WemapPositioningSDK or WemapCoreSDK

lifecycleScope.launch {
runCatching {
CoreSession.create(context, 19158, "GUHTU6TYAWWQHUSR5Z5JZNMXX") // Specify your mapId and token here
}.onSuccess { session ->
// now you have a session and can use it to continue with any WemapSDK
}.onFailure {
println("Failed to create session with error - $it")
}
}

WemapMapSDK

lifecycleScope.launch {
runCatching {
MapSession.create(context, 19158, "GUHTU6TYAWWQHUSR5Z5JZNMXX") // Specify your mapId and token here
}.onSuccess { session ->
// now you have a session and can pass it to a WemapMapView (see the MapSDK guide)
}.onFailure {
println("Failed to create session with error - ${it.message}")
}
}

The session is the sole owner of its services. When the screen that owns it goes away, tear it down with session.deinit() — typically from the lifecycle owner that holds it (e.g. a ViewModel.onCleared()).

Examples

For additional examples and sample implementations of WemapSDKs, visit the official GitHub repository.

Clone the repository and follow the README instructions to run the sample application.