Document Location SDK for Android Guides Utility Tools Location Type Reference

Location Type Reference

On a successful location request, the location callback returns a response code that indicates the source of the location fix. Use the following table to interpret the response code.

Response Code

Description

Details

0

Location failed

Call AMapLocation.getErrorCode() to retrieve the error code, then refer to the Error Code Reference for troubleshooting.

1

GPS location

Location result from the device's GPS module. High accuracy, typically within 10–100 meters.

2

Previous location

Returned when a network location request completes in under 1 second, or when the device's position changes very little between two location requests. Movement is detected by the device's sensors.

4

Cached location

A previously cached network location result from the same device position, returned from a short time ago.

5

Wi-Fi location

A network-based location using Wi-Fi. Generally more accurate than cell tower positioning, with accuracy typically between 5–200 meters.

6

Cell tower location

A network-based location relying solely on mobile network signals (e.g., from China Mobile, China Unicom, or China Telecom). Accuracy is typically between 500–5000 meters.

8

Offline location

-

9

Last known location

-

11

Approximate location

Returned when the user has set the app's location permission to "approximate location." Provides the user's general area.

12

System network location

Used when AMap's network location (Wi-Fi location) fails. Supported in SDK version 6.4.5 and later.