Widget onUpdate is not setting pendingIntent on button click after reboot
I'm creating a test widget that shows random number by clicking its button. everything is inside onUpdate of my Provider independently, including the pendingIntent . it works fine but after rebooting the phone views.setOnClickPendingIntent is not working although RemoteViews is recreated with no issue but the button becomes unresponsive. public class TestWidget extends AppWidgetProvider { static HashMap<Integer, BroadcastReceiver> br = new HashMap<>(); static void updateAppWidget(Context context, final AppWidgetManager appWidgetManager, final int appWidgetId) { context = context