一,在同一个activity,同一个线程内部使用handle
onpause()等回调;
ActivityThread中发送handle, 让binder回调立即返回
二,不同线程之间通信
HandlerThread mThread = new HandlerThread("ads") {
public void run() {
}
};
mHandle = new Handler(getMainLooper()) {
@Override
public void handleMessage(Message msg) {
if(msg.what == 1) {
}
}
};
mThread.run();
三,activity service之间通信