I’m learning about android and i have a problem.
I have some problems with de emulator so I run my app in a real device. But I have a problem because i have to simulate that I approach to some point.
For example, i’m at x-10,y-10 and when I am at x, y I have to show an information.
I know how to send a position by telnet and I know the DDMS tool but, can I use the DDMS tool to simulate this in a real device? How?
I’ve read that:
With the DDMS tool, you can simulate location data a few different ways:
- Manually send individual longitude/latitude coordinates to the device.
- Use a GPX file describing a route for playback to the device.
- Use a KML file describing individual place marks for sequenced playback to the device.
but I see that de location controls are disabled.
Thanks in adavance
You can use apps like Fake gps.
https://play.google.com/store/apps/details?id=com.lexa.fakegps&hl=en
Download and install this apk. You can set any location.
To check whether you reached your location say (x, y):
Check the distance between (x, y) and your current gps lcoation. If the distance in meters between these two locations is 0 (In practical give a buffer of atleast 10) then you reached your destiny!