Andrew Guenther
Andrew Guenther

Reputation: 1492

How do I run a method every 10 minutes in Android?

I am looking to run a certain method call every ten minutes in Android, what is the best way to go about implementing this? I am currently looking at using the Handler object's PostDelayed method.

Upvotes: 2

Views: 1858

Answers (1)

Nathan Schwermann
Nathan Schwermann

Reputation: 31493

Handler and PostDelayed is the way to go, at the end of your Runnable have it make the call mHandler.postDelayed(Runnable, 10 minutes)

Upvotes: 2

Related Questions