My app widget stops working after upgrading to targetSDk to 28.
I am getting the following e
The problem is in implicit broadcast that you're making in sendWidgetRefresh. You can break through the ban by defining a component name in your intent.
private static void sendWidgetRefresh(Context context) {
// send update broadcast to widget
Intent broadcast = new Intent(ClockWidgetProvider.WIDGET_DATA_CHANGED_ACTION);
ComponentName componentName = new ComponentName(context, WorldClockWidgetProvider.class);
broadcast.setComponent(componentName);
context.sendBroadcast(broadcast);
}
This worked for me! Change your implicit intent to explicit intent, because starting Oreo implicit intents don't run in background! https://developer.android.com/about/versions/oreo/background.html