Android - Monitoring internet connection status

Viewed 3416

In our app, we would like the ability to continually check for connectivity status, and if it goes down, throw a Toast or some kind of UI to indicate to the user that it's down. I tried doing this in our Retrofit Api-Builder class whenever API calls are made, but it doesn't seem to like Toasts there (causes crashes).

iOS has a monitoring capability, but it seems on Android, we have to check manually. Is there a simple/clean way of doing this across our app, given there are multiple Activities, etc?

3 Answers
Related