Android AlarmManager.setExactAndAllowWhileIdle() and WakefulBroadcastReceiver Not working in some new manufactured and low price devices

后端 未结 4 1548
北恋
北恋 2020-12-23 12:09

I think this question is asked many time in stackoverflow but still so many people struggling to resolved it.

In my android app I have to wake up device

4条回答
  •  情话喂你
    2020-12-23 12:34

    Probably these Chinese phones have disabled app wake for receiving alarm events to conserve battery life. I know that some Chinese makers don't wake app to receive push notifications if they are closed for battery conservation earlier. Thus until the app is manually opened again, it will not be woken up by the OS for any event processing.

    However this behaviour can be changed. Check power management settings and change accordingly to allow apps to be woken up at regular intervals or when needed. I think it could be Restricted Mode or something similar.

提交回复
热议问题