问题
I am getting multiple reports from users that they can't get GPS or location services in my app until they restart their phone, and then everything works no problem.
I only get a limited sample of android users complaints, from the set of users that use my apps but it seems shockingly similar to this issue:
https://code.google.com/p/android/issues/detail?id=39745
Google OTA updates rolled out to some additional carriers last week. Looking through my code changes over the last several months, I haven't changed any GPS/positioning stuff except in cases where I had to use the new google maps, but I can't tell if my particular user complaints are coming from a very old version or an upgrade from a very recent version or whatever version.
It appears to be related to Android 4.2 but I can't confirm that either, except the similarity of users restarting their phone and everything magically solves itself. I don't consider this a valid troubleshooting option though for my users.
Basically wondering if anyone else has solved this in code, and also putting it here in case other developers can relate to this
来源:https://stackoverflow.com/questions/15259229/android-app-not-able-to-get-gps-until-phone-restarts