AlarmManager is not triggered when App is closed

有些话、适合烂在心里 提交于 2019-12-03 20:40:55

Your AndroidManifest.xml should be like this:

<receiver android:name=".ReminderAlarmManager">
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
</receiver>

<service android:name=".OrderReminderNotificationService "/>

The alarm manager doesn't trigger the Intent services on certain phones. I was testing the app on a Oneplus 3T the entire day before I realized there was nothing wrong with the code. Just tested the same app on a Moto G, and it works as expected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!