I'm living in area where the internet connection would randomly online / offline. To ensure the smoothness of the business that my app currently supporting, I took the route where I would send its submission data straight to the server online if the device online at the submission time, but I'd save the data to sqlite, if the device goes offline at the submission time. Then, the app will automatically send the data online to server when the device goes online later
How do I achieve this? Should I make a service that would constantly check for internet connection if saved submission data exists? Or is there more proper and better way? Thank you.