Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.61k stars 291 forks source link

Mocked variable in response does not become false when fake gps app is turned off #257

Open m-tbox opened 3 years ago

m-tbox commented 3 years ago

Description

I want to detect that is user user any mock location app or not. When I turn the app on mocked variable in response becomes true and lat long also change accordingly, but then I turn off the mock location app mocked is still true and lat long have fake gps value not my actual coordinates.

I am using Geolocation.getCurrentPosition to get location

Environment

react-native: 0.63.4 react: 16.3.1 react-native-geolocation-service: 5.2.0

Expected behavior

When mock location app is turned off mocked variable in success response should be false and coordinated should also be user's actual location not fake gps coordinates from mock location app.

draperunner commented 3 years ago

Android or iOS or both?

erennyuksell commented 1 year ago

i have same issue mocked variable getting randomly true or false

DevHisham commented 11 months ago

Same issue here ; always return true. when fake gps app is turned off even after remove the fake gps app

Falkaniere commented 10 months ago

I'm facing the same issue here! There is a solution?

BeezyWorks commented 7 months ago

I fixed this by setting enableHighAccuracy: true

alvishdml commented 5 months ago

I also get random mocked: true or false while using Faker in Android. during watch position. Any one find any solution regarding this.

Falkaniere commented 5 months ago

I also get random mocked: true or false while using Faker in Android. during watch position. Any one find any solution regarding this.

I used the react-native-turbo-mock-location-detector and worked well! repository here