Since I just want to connect to a web service, in order to check whether there is an update or not, or to check whether there is a need to send data to that service, I believe AsyncTask and AlarmManager is perfect for this, but I don't know what to do about the Internet connection availability of the user.
Basicly, I think after reaching the time interval I'll constantly check for an internet conn开发者_C百科ection, if available connect to that web service, and after the connections restart the AlarmManager for the next time. What I am missing is the constantly checking internet availability, and using AlarmManager properly for this. Any advice would be great for me...
you can check for internet availability by creating a separate thread with infinite loop
..you can implement this thread in service
...
for alarm manager refer this doc:
http://developer.android.com/reference/android/app/AlarmManager.html
精彩评论