Back to project page jive-android-core-sdk-example.
The source code is released under:
Apache License
If you think the Android project jive-android-core-sdk-example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jivesoftware.example.utils; /* w ww .ja v a2 s .co m*/ import android.os.Handler; import android.os.HandlerThread; import com.jivesoftware.example.destroyer.IDestroyable; /** * Created by mark.schisler on 10/15/14. */ public class BackgroundThread implements IDestroyable { private final HandlerThread handlerThread; private final Handler handler; public BackgroundThread() { handlerThread = new HandlerThread(getClass().getName()); handlerThread.start(); handler = new Handler(handlerThread.getLooper()); } @Override public void destroy() { handlerThread.quit(); } public Handler getHandler() { return handler; } }