Detecting Mock Location Not Working (Android)
问题 I'm trying to set some protection against people using mock locations to manipulate my app. I realise that it's impossible to prevent 100%... I'm just trying to do what I can. The app uses Google location services (part of play services) in its main activity. The onLocationChanged() method is: public void onLocationChanged(Location location) { this.mCurrentLocation = location; if (Build.VERSION.SDK_INT > 17 && mCurrentLocation.isFromMockProvider()) { Log.i(TAG, "QQ Location is MOCK"); // TODO