Created
February 21, 2011 17:37
-
-
Save scott2449/837394 to your computer and use it in GitHub Desktop.
executor service
This file contains 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
public void onStart(Intent intent, int startId) { | |
super.onStart(intent, startId); | |
timer = Executors.newScheduledThreadPool(2); | |
timer.scheduleAtFixedRate(new Runnable() { | |
public void run() { | |
} | |
}, 0, 300, TimeUnit.SECONDS); | |
} | |
public void onDestroy(Intent intent, int startId) { | |
timer.shutdown(); | |
super.onDestroy(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment