2

Hi I am trying to detect wether user is using fake gps or not using trust_location and geolocator package. For geolocator package, as I know it has property of isMocked. So, when I open my apps and then turning on the fake gps, it success to return true that user is using fake gps. But the problem is.... I will get different result when I turn on fake gps for the first, and the second I open my apps... it will return false. It means that the fake gps is not detected... Is there another way to detect mock location of user ?

wahyu
  • 1,679
  • 5
  • 35
  • 73

1 Answers1

2

Your Geolocator must return a position object. From this object, you will find an option called isMocked. That will work perfectly for sure.

Position position = await Geolocator.getCurrentPosition( desiredAccuracy: gl.LocationAccuracy.high);

position.isMocked.

hope this will help you.

T shuvo
  • 31
  • 4