I am developing an Android app purely on geofence.
Concept: My basic concept on geofence is user can play games for particular geo location.
Problem: Everything is working fine but I downloaded the FakeGPS application from here. I was at home and I setup my desired location from where I can play game. My application has detected that geo location and I could play that game from my home. Actually it was supposed to play that game only for geo location.
Solution: I have checked that location is coming from MockProvider or not on GeofenceIntentService
class by given code.
boolean isMockLcoation = geofencingEvent.getTriggeringLocation().isFromMockProvider();
But its not a reliable solution. I am not getting every time accurate result.
I have checked LocationAssistance
service but anyway it couldn't help me for geofence.
Goal: I want to either disable mock location for my application or distinguish the location is true or mock.