You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ThreadHandler class is basically a Handler only it handles all of it's work from within it's own Thread. Google made a special HandlerThread class, which is an extended Thread class that could be used along with a regular Handler to obtain this feature. But instead of creating a HandlerThread instance only to parse it's Looper to the Handler, it seams better and easier to simply create a new Handler that does all of this automatically.
Example
HandlermHandler = newThreadHandler("Thread Name", Process.THREAD_PRIORITY_BACKGROUND) {
@OverridepublicvoidhandleMessage(Messagemsg) {
// This message is handled in a background Thread
}
};