Created
December 7, 2017 09:36
-
-
Save martinomburajr/f6bda2970d03d37c57ecd3619d660f12 to your computer and use it in GitHub Desktop.
The Android Looper Thread
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
| /** | |
| * Retrieved from https://developer.android.com/reference/android/os/Looper.html | |
| */ | |
| class LooperThread extends Thread { | |
| public Handler mHandler; | |
| public void run() { | |
| Looper.prepare(); | |
| mHandler = new Handler() { | |
| public void handleMessage(Message msg) { | |
| // process incoming messages here | |
| } | |
| }; | |
| Looper.loop(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment