I have a situation in which I need to test smart phone app. Objective is to disable my app based on the geolocation. So for example let say I am “live” streaming some video via my app and would like to disable streaming if user goes to certain restricted location and turn it ON when user moves to acceptable geological area.
Now the testing part is, that all the phones lets say 5 phones are in front of me and I want to test the app running on them that the app will get turned off when they will move into the restricted areas. How can this be achieved?
Edits:-
Actual scenario – Live streaming of a match which should not be shown in area near the stadium on the android app. So if a user hit “play” button on app and the phone is physically in video restricted zone for that particular duration of the match, the video should not be streamed to that cell phone.
any thoughts… opinions..?
Thanks
On android you have multiple options to supply your application with a mock location:
via DDMS, telnet or via the LocationManager:
DDMS
Start DDMS from the AndroidSDK/tools/ folder. Select the device you want to spoof the location for, and go to
Emulator Control. At the bottom of the tab you should find the option to manually set the location, and what location to spoof.ADB/Telnet
List all of your devices via
adb devices. From this you should get an output like this:Then telnet to the indicated port:
This should open the android console. There you can use the
geo fixcommand to set the locationLocationProvider
You can supply a location for testing using the
setTestProviderLocationMethod of theLocationProviderThis method I got from here
Additionally, do not forget to set the permission