Android Question Location updates freeze while GNSS Status remains active on Galaxy S23 Ultra

marcick

Well-Known Member
Licensed User
Longtime User
Hi all,
I'm experiencing an issue on some Samsung devices (starting from Galaxy S22 series and newer).
My app uses either the GPS library or the newer GNSS library to receive location updates. Randomly, after several hours of normal operation, the app suddenly stops receiving the LocationChanged event. However, the GNSSStatus event continues normally, and it still reports 30 to 40 satellites in use. So the location shown on the map freezes and never updates again.


During this issue, if I open Google Maps, it works fine and shows the correct location. Restarting my app does not help; only a full reboot of the phone solves the problem.
All battery optimizations and power saving restrictions have been disabled for both the app and system-wide.


ChatGPT suggests this is a known and widely discussed problem on Samsung devices. Its suggestion is to add a fallback mechanism using FusedLocationProvider to keep location updates active, and to inform the user that accuracy may be reduced while advising them to reboot the phone to restore full GNSS functionality.


Obviously, this is just a workaround, not a real solution.
I would like to know if anyone else has encountered this issue and if there’s any better fix or workaround for it.
Thank you!
 

TILogistic

Expert
Licensed User
Longtime User
You can use FusedLocationProviderClient for location and to know if there is a signal use GNSS status callback to know the fix, which satellite and signal strength.
With this you can now know why you are not receiving the location, and be able to determine what to do in your app.

ex. tips.
Use FusedLocationProviderClient with JavaObject to retrieve location every 5 seconds.
Use GnssStatus.Callback to determine how many satellites are visible and used in the fix.
Use a Timer to detect loss of GPS signal if no valid satellites are received within 10 seconds.
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Thank you. I will give it a try and use the new FusedLocationProviderClient instead of GNSS library to see if results are good for a normal tracking app (I mean have always less than 10 or 5 meters precision). I can ignore the satellite status and observe just the accuracy reported by FusedLocationProviderClient
 
Upvote 0
Top