Niaz Baig
Niaz Baig

Reputation: 41

Is there any solution for getting location in android emulator flutter

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

Upvotes: 1

Views: 3326

Answers (2)

Jeppe
Jeppe

Reputation: 2266

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.

Upvotes: 1

dm_tr
dm_tr

Reputation: 4763

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

Upvotes: 1

Related Questions