Skip to content Skip to sidebar Skip to footer

What Is The Best Way To Update Android Widget On Screen_on. Is It Supported In Android Oreo (api 26)

I created a widget, which was working quite fine, and then I changed targetSDK from 23 to 26, due to the requirement from Google Play Developer Console. After switching to Android

Solution 1:

Finally, I've found solution to this problem.

We can simply find answer here:

https://developer.android.com/training/monitoring-device-state/doze-standby

To solve the above problem, we can use Alarm Manager.

Standard AlarmManager alarms (including setExact() and setWindow()) are deferred to the next maintenance window.

So right after the doze mode finishes, or during a maintenance window, it will automatically execute the code, written in alarm manager service.

You can get help here to use Alarm Manager in your widget from this stackoverflow post: https://stackoverflow.com/a/14319020/3497865

Post a Comment for "What Is The Best Way To Update Android Widget On Screen_on. Is It Supported In Android Oreo (api 26)"