[問題] 接收廣播問題

作者: lihohsin (新)   2021-07-10 23:04:44
使用廣播接收
IntentFilter filter = new IntentFilter("com.xxxx");
MyBroadcastReceiver myBroadcastReceiver = new MyBroadcastReceiver();
registerReceiver(myBroadcastReceiver,filter);
想使廣播接收變成觸發條件
if(接收到廣播){
//執行動作
}
這個if() 條件判斷該怎麼寫呢?
作者: acoimfjn1b (acoimfjn1b)   2021-07-10 23:44:00
執行的動作寫在BroadcastReceiver的onReceive裡

Links booklink

Contact Us: admin [ a t ] ucptt.com