There seems to be a problem with the connection between GPS and my android application. About 1 time in 10 times (after starting the application) GPS does not start using LocationManager.requestUpdates () (GPS icon is not displayed, etc.). I built a timer that checks the GPS status every 15 seconds, and when the GPS is not working, it will remove updates from the LocationManager and request updates again (GPS status is checked through GpsStatus.Listener). Sometimes it wakes up GPS, and the problem is solved, but most of the time it does not work. However, turning the GPS off on the device and turning it back on [sometimes] fixes it. The application has many users with different devices who have this problem. I have a foreground function that always works that requests these location updates in onStartCommand (),and removes updates in onDestroy (). I tried many different solutions, but none of them work (frustrating). I tried a fusible provider, but this does not always give the most accurate location / does not have a carrier / speed, etc. Is there any other way to give GPS a push to wake it up or has anyone had this problem before? In addition, I noticed that whenever this happens, and I close the application, delete it from memory and start it again, the problem is also fixed. It seems that something in the application blocks it from communicating with GPS (I do not know if this is possible).to wake him up or has anyone had this problem before? In addition, I noticed that whenever this happens, and I close the application, delete it from memory and start it again, the problem is also fixed. It seems that something in the application blocks it from communicating with GPS (I do not know if this is possible).to wake him up or has anyone had this problem before? In addition, I noticed that whenever this happens, and I close the application, delete it from memory and start it again, the problem is also fixed. It seems that something in the application blocks it from communicating with GPS (I do not know if this is possible).
I am wondering if anyone has any suggestions regarding the problem. Thanks in advance,
source
share