1、启动线程
1.11 new Handler()形式
new Handler(mContext.getMainLooper()).post(newOnekeyBindFrameActivity.NetworkThread());
1.12
new Handler().postDelayed(new StatusCheckLoginBindFrameThread(), IoTCultivatePlantConfig.START_ACTIVITY_POST_DELAYED);
1.2 new Thread(NetworkThread).start();形式
2、创建线程
2.1
private class NetworkThread extends Thread {
@Override
public void run() {
doSocket();
}
}
2.2
Runnable NetworkThread = new Runnable() {
@Override
public void run() {
doSocket();
}
}