I'm am developing an Android app that uses Volley to send some data entered by the user to my server. I am also saving this data in a local SQLite database. All this works just fine. The problem occours if the internet connection is lost. How do I know when I must try to re-upload the data.
If the network connection is lost I can use a BroadcastReceiver to find out when the connection is established. However how do I ensure this works even when the device is connected to the network but there is no access to the internet.