Warm tip: This article is reproduced from serverfault.com, please click

Changes in Android 11, no longer able to provide mock location

发布于 2020-11-29 22:34:45

I have an app that provides mock locations, works fine up to Android 10, however on Android 11 it no longer works, I just get the error "Error while pushing mock location gps provider is not a test provider" I searched the docs but I can't find any info on what may be causing the error. Is this a permission issue? I am not sure what changed, the APK works fine on Android 10 and less but not 11.

Questioner
Phunction
Viewed
0
Phunction 2020-12-01 08:10:06

In case anyone else comes across this, when adding the provider to the location manager, I could no longer specify a power of 'no requirement' or an accuracy of 'high'. I had to specify low power and medium accuracy. I understand the power one but not sure why accuracy high would not be allowed for android 11.