How do I send updates to an Android emulator as if they were coming from the "network" provider. DDMS seems to send as the "gps" provider, with no way to change it.
Asked
Active
Viewed 1,324 times
1 Answers
2
As far as I know, you can't use the "network" provider in the emulator, unfortunately.
Note: Providing mock location data is injected as GPS location data, so you must request location updates from GPS_PROVIDER in order for mock location data to work.
http://developer.android.com/guide/topics/location/strategies.html#MockData

Charlie Collins
- 8,806
- 4
- 32
- 41
-
That's unfortunate. Is there any way to do it from the command line? – karl Jan 24 '13 at 00:23
-
1Nope, unfortunately no, anytime you "mock" locations, DDMS or from the terminal with "geo fix," it uses GPS as the provider. – Charlie Collins Jan 24 '13 at 00:51
-
Oh well. Thanks for the info. It looks like I could internally create a `LocationProvider` subclass and use that, but then it would be part of my app, and I just want it for testing. – karl Jan 24 '13 at 07:01