I want to test my app on an emulated device that does not have a GPS, and just have network location. I have created the hardware profile for a device without GPS.
How can I send a LAT/LONG location to this emulator using network location? The only option I see on the emulator is to send the location as GPS data point.
- Note this is different from How to emulate GPS location in the Android Emulator?. I want the network location, not GPS location. they are from different location providers although they return the same information.
background
There are some platform changes affecting API 21 coming on 15 Oct 2016, and I would like to test the user experience for my app due to the changes. This include testing on emulated devices
- with network location without GPS
- with GPS without network location
According to https://developer.android.com/guide/topics/location/strategies.html#Permission, we now need to include either of the following uses-feature into the manifest
android.hardware.location.network or android.hardware.location.gps
my app requires either one of the two, so I included the following
<uses-feature
android:name="android.hardware.location" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
<uses-feature
android:name="android.hardware.location.network"
android:required="false" />
The following questions contains some information regarding the changes:
When do I need android.hardware.location.gps and android.hardware.location.network? and