I want to make sure the location received by the LocationListener is a "real" one and doesn't come from a spoofed source (I.e the Application Location Spoofer). I don't care about "but the user sometimes want to spoof the location" - it's about an app which doesnt get distributed over the android market. The application does not need the location to be that accurate - it just has to be "real".
Do you think there is a way to check if the location has been spoofed?
What do you think is a good way to prevent location spoofing?
Is there maybe a android-method which gives me the real location nevertheless?
Is there maybe a android-method to determine if the location has been spoofed?
Thoughts I had:
Please give me your thoughts and input to this issue.
On Android 18 (JellyBean MR2) and above mock locations are detected using Location. isFromMockProvider() for each location. The app can detect that the location came from a mock provider when the API returns true.
Unfortunately, doing so isn't very straightforward. There isn't a “fake GPS location” setting built in to either iOS or Android, and neither do most apps let you spoof your location through a simple option. Setting up your phone to use fake GPS only affects your location.
Can You Fake Location on Google Maps? Yes, you can fake your location on Google Maps. Nowadays, it's quite easy for you to get Google maps fake locations. If you're an Android user, you need to download and install applications from the Google Play Store.
Select Android > Restrictions > Click on Configure button. Under Allow Developer Options, uncheck Mock location option to restrict users from turning on Mock Locations on their devices.
Most spoofers forget to send GPS status updates. That is something that you can use to your advantage
// returns true if mock location enabled, false if not enabled.
if (Settings.Secure.getString(getContentResolver(),
Settings.Secure.ALLOW_MOCK_LOCATION).equals("0"))
return false;
else return true;
The best method is this :
Have a look on "Maintaining a current best estimate" topic on the following page:
Maintaining a current best estimate
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With