One of the key requirements for my app is to load data into a database, which necessitates having an active Internet connection.
I have been contemplating what to do in case of network failure - perhaps I can store the data locally on the device and synchronize it once the connection is restored?
My main query at this point is: how can I detect when the network connection is back? Is there a specific signal that can be captured using a handler for delayed uploading, or should I consider implementing a periodic check every few seconds?
Just to provide some context: I am currently utilizing Cordova in conjunction with AngularJs for development.