简体   繁体   中英

Disabling GPS in Android emulator

Just a simple question - is there a way to disable GPS in the Eclipse Android emulator? I want to see how the application will behave when GPS is turned off.

Or OPen Android Virtual Device Manager, click on device you want to edit then on Hardware group click on New and choose GPS support property. After you add that property to existing properties, change it value with dropdown to false. After that just click on EditAVD

Open the settings app in the emulator and uncheck the option with a name like Use GPS satellites .

You might have to poke around a bit in the sub options to find it. If you tell us the exact android version, we can tell you where to look exactly.

in Android Studio in the AVD Manager:

在此输入图像描述

I am not sure about this option works or not but if you try to enable or disable the option for gps in settings.One with the text "Use GPS Settelites".You will get unreliable result.As i have tried that one in the in built maps application of emulator.

I have tried sending the location from DDMS and than checking the current location in maps application before and after toggling that option but it seems it doesnt work once it is checkd OFF form ON.As after that i am not getting any location and it alsways says that "you location is temporary unavailable".

So don't use that option.Or you better check the same thing works for you or not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM