Basicly I need that my app sends some data to a server when the connection to the network is established and it has to be in the background. That's it.
Is there a way that my service is automaticly started when connection is made? Or should I use regular Service which tests the connection and run this service in something like 30min intervals? Should I use something like the AlarmManager to check for the connection? This seems as a waste of the resources and as far as I'm aware Android can stop services if resources are needed.
Any suggestions or even better - samples on what is the optimal way?
Thank you.