SDKhybridcurrent

Mappls Location Capture SDK

mappls-location-capture-android-sdk

A lightweight, on-demand location capture SDK for Android that enables applications to fetch a user’s current location efficiently with accuracy limits, timeout control, and minimal battery usage. The SDK supports single-shot and subscribed location fetching without continuous tracking.

What this surface enables

A lightweight, on-demand location capture SDK for Android that enables applications to fetch a user’s current location efficiently with accuracy limits, timeout control, and minimal battery usage. The SDK supports single-shot and subscribed location fetching without continuous tracking.

Why this source is classified hybrid

The source identity names a capture, feedback, geofence, analysis, or guided-operation surface where provider calls and application-owned workflow state must be separated.

Authority: Source Identity · Evidence: location-capture
Platforms

Android

Product areas

Search PlacesTracking TelematicsWorkforceWidgets Deep LinksCapture Feedback

Languages found

KotlinGroovyJava

Authentication signals

No explicit authentication signal detected

Prepare the integration

  1. An Android project with a supported Gradle and Kotlin or Java toolchain
Production guardrailsPin package versions and record the source fingerprint.Keep server credentials out of client binaries and logs.Test failures, timeouts, quota limits, upgrades, and rollback.Validate legacy examples against current authentication contracts.

Setup and usage examples

These examples were extracted from the canonical public source document and sanitized for credential-like values. Check the source branch and package version before copying into a production application.

mappls-location-capture-android-sdk examples
pluginManagement {
        repositories {
            maven(url = "https://maven.mappls.com/repository/mappls/")
        }
    }
    dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven(url = "https://maven.mappls.com/repository/mappls/")
    }
    }

Operate the whole lifecycle

This operational model supplements the repository-level setup instructions. Adapt its resource names and transitions to the owning product contract.

1
Define intent

Create a bounded application request or draft with purpose, policy, revision, and lifecycle owner before provider UI or capture begins.

2
Launch

Give one screen, controller, subscription, or callback generation explicit ownership of configuration, cancellation, timeout, and cleanup.

3
Normalize

Treat provider output as a candidate; validate and copy a narrow portable value instead of persisting an opaque SDK or UI object.

4
Commit or review

Use application-owned versioning, idempotency, review, and audit when a candidate affects a durable business decision.

5
Dispose and recover

Stop listeners and native resources once, ignore late generations, and restore only application-owned state after restart.

Topics documented by the source

01Getting started

A lightweight, on-demand location capture SDK for Android that enables applications to fetch a user’s current location efficiently with accuracy limits, timeout control, and minimal battery usage. The SDK supports single-shot and subscribed location fetching without continuous tracking.

02Key Capabilities

• One-time location capture with accuracy threshold

• Subscribed mode until accuracy or timeout is reached

• Automatic termination (no background tracking)

• Accuracy, timeout, and retry limits

• Mock location detection

• Network and GPS state awareness

03Add Mappls Repository

• Add the Mappls repository to your settings.gradle or settings.gradle.kts file:

04Adding Mappls Configuration file

• Download Configuration files for your app (associated with Package Name and Signing Certificate SHA-256 ) - Add Configuration files ( .a.olf and .a.conf) into the module app-level root directory of your app - Add Mappls Service Plugin as a dependency in your project level build.gradle or build.gradle.kts

05Groovy (build.gradle)

• Add Mappls Services Plugin in your app-level build.gradle or build.gradle.kts file

06Add the dependency

• Add below dependency in your app-level build.gradle

07Initialization (Required)

Initialization must be completed before invoking any location fetch method.

• What happens during initialization

• Location permissions validation

• Configuration setup (accuracy, timeout, attempts)

• Location engine configuration

• SDK readiness check

08Kotlin

kotlin val mapplsLocationEngineRequest = MapplsLocationEngineRequest.Builder(5000L) .setDisplacement(0f) .setPriority(PRIORITYHIGHACCURACY) .build()

val option = LocationCaptureConfig.Builder() .setMapplsLocationEngineRequest(mapplsLocationEngineRequest) .setTimeoutValueInSecond(60) .setAccuracy(15.0) .setNumberOfAttempts(5) .build()

LocationServiceProviderManager.getInstance().initialise(this, object : OnLocationPluginInitialise { public override fun onSuccess() { LocationServiceProviderManager.getInstance().setLocationCaptureConfig(option) }

public override fun onFailure(code: Int, reason: String) {

09Java

java MapplsLocationEngineRequest mapplsLocationEngineRequest = new MapplsLocationEngineRequest.Builder(5000L) .setDisplacement(0f) .setPriority(PRIORITYHIGHACCURACY) .build();

LocationCaptureConfig option = new LocationCaptureConfig.Builder() .setMapplsLocationEngineRequest(mapplsLocationEngineRequest) .setTimeoutValueInSecond(60) .setAccuracy(15.0) .setNumberOfAttempts(5) .build(); LocationServiceProviderManager.getInstance().initialise(this, new OnLocationPluginInitialise() { @Override public void onSuccess() { LocationServiceProviderManager.getInstance().setLocationCaptureConfig(option); }

@Override public void onFailure(int code, String reason) {

10LocationCaptureConfig

| Parameter | Description | Default | | Interval | Preferred location update interval | 5 seconds | | Accuracy | Minimum acceptable accuracy (meters) | 15m | | Timeout | Maximum time SDK attempts location fetch | 60 seconds | | NumberofAttempts | Maximum location packets | 5 |

11MapplsLocationEngineRequest

| Parameter | Description | Default | | Priority | Location priority mode | HIGHACCURACY | | Displacement | Minimum movement required | 0 meters |

The SDK automatically stops once accuracy OR timeout/attempt limit is reached.

121. Single-Shot Location Fetch

Fetches one valid location snapshot and terminates automatically.

13Kotlin

kotlin LocationServiceProviderManager.getInstance() .getOneTimeLocation(object : MapplsLocationListener { override fun onLocation(mapplsLocationData: MapplsLocationData) { val log = "MapplsLocationData{" + "lat=" + mapplsLocationData.getLocation().getLatitude() + ", lng=" + mapplsLocationData.getLocation().getLongitude() + ", accuracy=" + mapplsLocationData.getLocation().getAccuracy() + ", provider=" + mapplsLocationData.getLocation().getProvider() + ", time=" + mapplsLocationData.getLocation().getTime() + ", isAcceptable=" + mapplsLocationData.isAcceptable() + ", isMockLocation=" + mapplsLocationData.isMockLocation() + "}" Log.d("location", log) }

override fun onError(code: Int, reason: String) { Toast.makeText(this@MainActivity, reason.toString(), Toast.LENGTHSHORT).show() } })

142. Subscribed Location Fetch (Limited)

Continuously receives location updates until accuracy or timeout is met, then auto-unsubscribes.

15Output Details

Each successful callback provides:

• Latitude & Longitude - Accuracy (meters) - Timestamp - Provider / mode - Mock location flag - Acceptable accuracy flag

16During Initialization

| Error Code | Message | Description | | 10 | UnknownHostException | Returned when there is no internet connectivity during SDK initialization | | 11 | Exception message | Returned for any unexpected exception during the initialization API call |

17During Function Calls

| Error Code | Message | Description | | 12 | LocationPlugin not initialized properly | Function invoked before SDK initialization or before onSuccess() callback | | 13 | Missing location permission | Required location permission not granted by the user | | 14 | GPS is not enabled | Device GPS / location service is disabled |

For any queries and support, please contact:

Email us at apisupport@mappls.com

Support Need support? contact us!

[](https://about.mappls.com/blog/)[](https://github.com/Mappls-api)

[](https://twitter.com/mappls)[](https://www.linkedin.com/company/mappls/)[](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7J9HiOA)

Service references found

URLs are sanitized during ingestion and may include documentation or legacy hosts. Use them to trace the source, not as a substitute for the current API contract.

https://www.mapmyindia.com/apihttps://maven.mappls.com/repository/mappls/https://about.mappls.com/api/https://about.mappls.com/contact/https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[https://www.npmjs.com/org/mapmyindiahttps://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOAhttps://about.mappls.com/api/terms-&-conditionshttps://about.mappls.com/about/privacy-policyhttps://about.mappls.com/pdf/mapmyIndia-sustainability-policy-healt-labour-rules-supplir-sustainability.pdfhttps://about.mappls.com/pdf/Health-Safety-Management.pdfhttps://about.mappls.com/pdf/Environment-Sustainability-Policy-CSR-Report.pdf