1

I'm using geolocator package for the purpose of device current location when I'm using my app in my real device that's perfectly run and returning back the exact long and lang when I'm using the same app in android emulator nothing is returning how I can resolve this issue?image is given below in which i'm using lacation's class object

Niaz Baig
  • 41
  • 6
  • Here is a similar issue in the location package repo: https://github.com/Lyokone/flutterlocation/issues/532 – RobDil Apr 10 '21 at 00:01

2 Answers2

1

The default location in Android Emulator is Googleplex, Mountain View (US). You cannot track Emulator location but can simulate it. An example how to do it here

dm_tr
  • 4,265
  • 1
  • 6
  • 30
  • I've follow all the steps that are mentioned in the given link but still can't access my emulator's location that I've entered manual and gpx/kml both. – Niaz Baig Jan 03 '21 at 20:00
1

The only thing that worked for me, was changing the location and then going into Google Maps on the emulator, enable location there and wait for it to jump from the Googleplex location, to the custom location. Then I restarted my app, and it returned the correct location.

Jeppe
  • 1,830
  • 3
  • 24
  • 33