Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将默认的provider移除之后,可以在退出软件后恢复默认provider吗? #17

Open
WHULS opened this issue Aug 16, 2019 · 1 comment

Comments

@WHULS
Copy link

WHULS commented Aug 16, 2019

使用完虚拟定位后,关闭软件,手机的定位似乎就不好使了,请问这正常吗?

@WHULS
Copy link
Author

WHULS commented Aug 17, 2019

解决,来自Stack Overflow @blackkara

p lm.removeTestProvider(LocationManager.GPS_PROVIDER);

When remove the provider, just let Gps to receive fresh location, then it will be fixed. You can test it

Set your mock location for Gps

Go to GoogleMaps and see your mock location (Gps must be enabled)

Turn back your app and stop mocking

Go again GoogleMaps, and wait until Gps provider receive a real location. It could take a bit time, when i tested in home, taken 1-2 minutes but in balcony just 5 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant