我有2项活动:1。BroadCastReceiver 2.设置。我在Settings活动中写了一个条件,一旦满足,应禁用BroadCastReceiver类,否则BroadCastReceiver类不能运行,直到我在Settings Activity中反转条件。但是问题是BroadCastReceiver类是通过Manifest文件调用的,我给它一个延迟:
android:name="android.provider.Telephony.SMS_RECEIVED"
现在,我无法弄清楚如何通过设置活动来禁用BroadCastReceiver类?