I want to use Geofencing location API in my application to set certain Point of Interest. I have used this demo provided by google. I am able to run this demo when WIFI and location services both are on. But this doesn't seem to work when only GPS is turned on. I am not able to get GEOFENCE_TRANSITION_ENTER or GEOFENCE_TRANSITION_EXIT events for that. I have modified the expiration time to NEVER_EXPIRE, but still no luck. Can anyone point out what I am doing wrong ? TIA.
Edit: After following many sites, I finally managed to get the Geofence API working with this code. That is, Poll the GPS hardware on an interval without doing anything with the result. But now my question is that, is it the right way to do it ? Will google allow this once it's on Play store ? Please guide me on this topic.