Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Correct location on device, but not on emulator (Android)

As title says, I use Google Maps on my App, but the thing is, when I run my App on my phone (LG G4) It shows my current location, but when I try to run it on an emulator (Android Studio integrated emulator) it shows Google's Offices location I've already checked if my computer has its location located there, but no, everything seems fine excepting that. Any ideas?

like image 872
Jesús García Avatar asked Jul 03 '18 20:07

Jesús García


People also ask

Why is my Android showing wrong location?

For Samsung smartphones running Android 10 OS, the location information may appear inaccurate if the GPS signal is obstructed, location settings is disabled, or if you are not using the best location method.

How do I get current location on emulator?

From terminal run telnet localhost 5554 , you are now in emulator shell. Type help ,it will show available commands , like faking a call, sms, battery etc. To know more about a command type help <command name> . Type help geo , it will print available location commands.

How can location be emulated Android?

First, run your Android Emulator and click on the three dots on the menus beside. On the left pane, select Location and change the coordinates according to your location. Press the Send button, changes will immediately take effect.


1 Answers

It's in emulator's extended controls. Click the three dots on the emulator side button panel and the first settings page is where you set the GPS coordinates you want to emulate.

like image 50
Actine Avatar answered Sep 21 '22 14:09

Actine