All Products
Search
Document Center

Mobile Platform as a Service:Location Based Service

Last Updated:Jun 10, 2026

The Location Based Service (LBS) SDK provides lightweight location APIs built into the mPaaS framework. Use it to retrieve a device's current position — latitude, longitude, and optionally a reverse-geocoded address — on Android and iOS.

How it works

When your app calls the LBS API, the SDK queries the underlying location provider (GPS, network, or fused) and returns a LBSLocation object containing coordinates and accuracy metadata. If reverse geocoding is enabled, the SDK also returns an LBSLocationInfo object with a structured address.

All location requests are asynchronous. Your app registers a callback and receives results without blocking the main thread.

Supported platforms and integration methods

Platform

Integration method

Android

Native AAR (direct dependency)

Android

Component-based integration (mPaaS component framework)

iOS

CocoaPods

Choose the integration method that matches your project setup before you start. Switching methods after integration requires reconfiguring your build scripts and dependencies.

Capabilities

  • Retrieve device coordinates (latitude and longitude) in a single API call

  • Enable reverse geocoding to convert coordinates into a human-readable address

  • Control location accuracy to balance precision and battery consumption

  • Request one-time location fixes or continuous location updates

Limitations

  • iOS: Reverse geocoding is not supported on iOS. The needReGeocode parameter has no effect on iOS devices.

  • Location accuracy: The SDK depends on the underlying device hardware and available signals (GPS, Wi-Fi, cellular). Accuracy varies by environment.

  • Background location: Background location updates require additional permissions and OS-level configuration not covered in this guide.

Prerequisites

Before you begin, ensure that you have:

  • An mPaaS project set up for Android or iOS

  • A location service key (Gaode Maps key) from the Gaode Open Platform

  • Location permissions added to your app manifest (Android) or Info.plist (iOS)

Next steps