Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

The emulator's simulated location never reaches the app

ErrorGoogle Maps shows the old position after sending a location

Short answer

The emulator only changes the device location after you press Set location (or play a route) in Extended controls. If the app still sees nothing, check which location permission the user granted, since approximate access limits precision, and check that device location settings meet what the app asks for.

  • Applies to Android Emulator current stable, Android Studio current stable, API 34 and higher system image
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check which emulator the app is running on, then open Extended controls (the three dots) > Location and confirm a point is applied. Compare with My Location in Google Maps on the same virtual device.

    adb devices -l
  2. 2Match what you see, then jump to its fix

    1. 1The map pin moved in Extended controls, but My Location in Maps did notThe point was picked on the map but never appliedFix
    2. 2Locations arrive but are coarse, or a precise-location feature failsThe user granted only approximate location to your appFix
    3. 3Fused location returns nothing although permissions are grantedDevice location settings do not satisfy the requestFix

What does the error look like?

  • Google Maps shows the old position after sending a location
  • The app never receives the location set in Extended controls

Cause 1 of 3

The point was picked on the map but never applied

1Check

In Extended controls > Location, a point only takes effect when you press Set location. A saved route only moves the device after Play route.

# Extended controls (the three dots) > Location > Single points

2Fix

Search or click the place, press Set location, and for routes press Play route.

# Extended controls > Location > Set location

3Verify

Tap My Location in Maps; it jumps to the point.

# Open Google Maps on the emulator and tap My Location

Confirmed by developer.android.com

Did this fix it?

Cause 2 of 3

The user granted only approximate location to your app

1Check

If the user grants approximate location, the app gets only approximate access, regardless of what the manifest declares.

grep -n "ACCESS_" app/src/main/AndroidManifest.xml

2Fix

Declare both location permissions, handle approximate grants, and ask the user to upgrade to precise location if the feature needs it.

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

3Verify

Grant Precise in the runtime dialog and repeat the request.

# Re-run the feature and log whether the location is precise

Confirmed by developer.android.com

Did this fix it?

Cause 3 of 3

Device location settings do not satisfy the request

1Check

Apps that use Google Play services location should check the device's location settings with the Settings Client and prompt the user if they are not met.

grep -rn "checkLocationSettings" app/src

2Fix

Check the location settings with the Settings Client and, when the failure is a ResolvableApiException, show the resolution dialog so the user can change them.

val client = LocationServices.getSettingsClient(this)
client.checkLocationSettings(builder.build())

3Verify

The check succeeds and updates start.

# The success listener runs and updates start

Confirmed by developer.android.com

Did this fix it?

How do I stop it coming back?

  • Save the points you use often in Extended controls.
  • Handle approximate-only location grants in the app, since users can choose them.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Android Studio cannot pair the phone over Wi-Fi

The Pair devices over Wi-Fi dialog lists no device

Wireless pairing needs the phone on Android 11 or higher and on the same Wi-Fi network as the computer, with current Platform-Tools.

4 causes, each with a fix

Mobile apps

adb tcpip 5555 fails because no device is found

adb: more than one device/emulator

adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.