@Override public void onDestroy() { super.onDestroy(); new Thread() { public void run() { if (thread != null) thread.destroy(); } }.start(); }
@Override public void onCreate() { super.onCreate(); context = getApplicationContext(); thread = new RequestListenerThread(Constant.Config.PORT, Constant.Config.Web_Root, context); thread.setDaemon(false); thread.start(); }
@Override public void onDestroy() { super.onDestroy(); new Thread() { public void run() { if (thread != null) thread.destroy(); } }.start(); }