Reputation: 93
Is there some way of executing a block of code as soon as the device connects to the internet?
The situation is this: Currently I have an application that sends information to a server. This works fine when the device is connected. However, when there is no connection, the information never gets sent. Is there some way of putting this code on hold until the user connects to the internet? Kinda like an 'onInternetConnectionEstablished()'. Or perhaps a way of having a service block or loop until a connection is established?
Upvotes: 1
Views: 432