In an Activity, I need to call a web service every 30 seconds or so, and use the data to update the UI.
How can I schedule a repetitive task?
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 this is in a running activity, you could use
Timer/TimerTaskand aHandler, or you could usepostDelayed()and anAsyncTask.