Created
July 14, 2012 14:33
-
-
Save kenota/3111617 to your computer and use it in GitHub Desktop.
starting scheduled task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Handler handler = new Handler(hThread.getLooper()); | |
final long oneMinuteMs = 60 * 1000; | |
Runnable eachMinute = new Runnable() { | |
@Override | |
public void run() { | |
Log.d(TAG, "Each minute task executing"); | |
handler.postDelayed(this, oneMinuteMs); | |
} | |
}; | |
// Schedule the first execution | |
handler.postDelayed(eachMinute, oneMinuteMs); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment