I have an app which has a foreground notification started from a service.
The service calls at each second a class which serves as a GPS connection.
The GPS class uses NETWORK_PROVIDER
and GPS_PROVIDER
.
All worked correct so far, except for today until something happened.
At some point a message was displayed by Android system saying something like "Unless you connect to wifi network or mobile network, you will not be able to access email and internet". I don't remember well the message, but I had 2 buttons: "Cancel" and "Ok". I might have clicked on something when pulling the phone out of my pocket.
On top of this message was another message saying that my app unfortunately crashed. So the order of events seem to be this: network disabled (?), app crashed.
I think that I need to handle the network error somehow, but I'm clueless right now, because I couldn't get to much info from the error.
Any thoughts?
Thanks