android - Service Timer Notification -


hi!

i want make service in oncreate(), , every 5 minute, service show notification..

can show me it??

thanks before :)

you can use timertask class postdelayed method.

private timertask mtask = new timertask() {         @override         public void run() {             //whatever want           postdelayed(this, repeat_interval);   // rinse , repeat...         }     }; 

and in oncreate launching timertask first time:

postdelayed(mtask, initial_delay); 

you can find information in android article

http://developer.android.com/resources/articles/timed-ui-updates.html


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -