Last active
December 30, 2015 12:29
-
-
Save badgercl/7829547 to your computer and use it in GitHub Desktop.
Runs code on the Android Application's main thread when no Activity is present (usually when using services)
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 Context context_t = cntxt; | |
| Handler mainHandler = new Handler(cntxt.getMainLooper()); | |
| Runnable locRunnable = new Runnable() { | |
| @Override | |
| public void run() { | |
| // Code | |
| } | |
| }; | |
| mainHandler.post(locRunnable); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment