I successfully get GPS data through the registerLocationListener () and onLocationChanged () methods. The only problem is that the reading speed of my application freezes if there is no GPS data anymore (for example, when I go indoors, enter a tunnel, etc.). The behavior that I want for my application is that the user is somehow notified that the speed readings are probably not accurate due to the lack of fresh data (set speed to zero, flashing read speed, etc. .).
How can i do this? I periodically checked if any satellites were detected by the GPS module, but I'm not sure how to force periodic checks.
source
share