0
我有一個問題,我的BroadcastReciever設置爲從主活動啓動的子活動中未接收到來自AlarmManager的事件。我不知道要去哪裏看。有時候,如果孩子的活動開始的速度夠快,那麼AlarmMananger似乎永遠不會發送一個事件。我試圖觸發事件幾周到未來,但我甚至無法獲得未來的工作,只有毫秒我得到任何在BroadcastReciever(這是在類NotifyAlarmReceiver中實現的)onReceive()返回來自AlarmManager的BroadcastReceiver未在兒童活動/意圖中接收
我的清單文件有:
<receiver android:name=".notifications.NotifyAlarmReceiver"></receiver>
我試過使用進程和導出的字段,但他們似乎沒有做任何事情。
和代碼來設置報警:
Intent notifyReceiverIntent = new Intent(this, NotifyAlarmReceiver.class);
PendingIntent notifyPI = PendingIntent.getBroadcast(this, 0, notifyReceiverIntent, PendingIntent.FLAG_UPDATE_CURRENT);
mAlarmManager.set(AlarmManager.RTC, timems, notifyPI);
我應該在哪裏看呢?