android - How can GPS location be trusted? -
i'm making new app mobile platforms uses gps track user position , need trust location.
so how can make mobile app trust gps location received? nowadays it's easy fake apps. solution i've found test if there mock on gps, can bypassed.
i'm building app cordova.
there few ways check if user faking location. 1 way check if have 'allow mock locations' checked in developer settings. way following code:
if (settings.secure.getstring(getactivity().getcontentresolver(), settings.secure.allow_mock_location).equals("0")) { //allow mock locations enabled! } or if on android 6+:
@override public void onlocationchanged (location location){ boolean ismocklocation = location.isfrommockprovider(); } although these many of fake location apps out there, no guarantee hasn't found way around this.
Comments
Post a Comment