I've been testing the geofencing api available in the latest Google Play Services, using the official sample available here: https://github.com/googlesamples/android-Geofencing/ And of course, following the training course: http://developer.android.com/training/location/geofencing.html
The sample displays a notification when you are nearing two Google buildings in San Fransisco, so I tweaked it to be triggered when I'm nearing my home or my work place.
If I use a real device, it works. The notifications are triggered properly. But when I'm using a simulator, and change the location with telnet or ddms, nothing happens. I also tried with Genymotion, with the Gapps installed, and same stuff: nothing.
Would anyone have any pointer about how to test geofence, without actually moving my butt? Because in the street, there is no way to debug the code...
Here is what you need to do:
Settings -> Developer options -> Allow mock locations
Add the following permission:
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
Ensure your GPS location service is ON (high accuracy) not Network location
Download an app called Fake GPS (it has yellow happy fact holding a remote control) from the app store. You can set your fake GPS using that app
Hope this answers you question :)