I try to make an asynctask that can regularly get the code of a web page. I can do this one time with doInBackground method but I can not execute several times :/
Can you help me please ?
Thanks
I try to make an asynctask that can regularly get the code of a web page. I can do this one time with doInBackground method but I can not execute several times :/
Can you help me please ?
Thanks
As mentioned here: Repeat a task with a time delay? you should use the Handler
class :-)
I got a good example here, http://www.techrepublic.com/blog/software-engineer/use-androids-alarmmanager-to-schedule-an-event/
use
AlarmManager.setRepeating() insted AlarmManager.set()
like
AlarmManager.setRepeating( AlarmManager.RTC_WAKEUP, Calendar.getInstance().getTimeInMillis() , 2500 ,pi );
where 2500 is interval time in Milliseconds