Android app can't access location on emulator using FusedLocationApi Android app can't access location on emulator using FusedLocationApi android android

Android app can't access location on emulator using FusedLocationApi


I have run into the same problem on the emulator. The only fix I have found is to use PRIORITY_HIGH_ACCURACY.

Explanation:It is the only option that will force android to turn on the GPS chip (virtual chip in the case of the emulator). On a real device this is not an issue because the phone can use cell reception and wifi to figure out an approximate location. On the emulator there is no cell reception and the wifi is abstracted as just a network connection. So the emulator can pretty much only use the GPS for location.

If you really do not want to use PRIORITY_HIGH_ACCURACY in your actual application you could create (or find an example app) for FusedLocationApi with the accuracy set to PRIORITY_HIGH_ACCURACY. Run that before you run your actual app (PRIORITY_BALANCED_POWER_ACCURACY) and there will be a last known location available.