Android - doing backgroud work every few minutes -



Android - doing backgroud work every few minutes -

i need write application background work every few minutes. question how can start work service. need create using threads , calculating time using scheme utils or maybe there improve solution?

you can utilize handler , postdelayed method:

handler handler = new handler(looper.getmainlooper()); handler.postdelayed(new runnable() public void run() { // work } }, minutes * 60 * 1000);

if interval sufficiently long can consider using alarmmanager.

android android-service

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -