What is the best and most efficient way in android to schedule an update for some weather data from the server every X hours?
Thanks
Sam
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are asking about scheduling system, a good way is using
AlarmManager, which can wake up your activity even if it is not running.Here is some info: http://developer.android.com/reference/android/app/AlarmManager.html
And here a nice example with
Notification: http://android.arnodenhond.com/tutorials/alarm-notification