AlarmManager object after turning off and on the phone
问题 In my app, I set an alarm AlarmManager alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE); ... PendingIntent pendingIntent = PendingIntent.getBroadcast(context, id, intent, PendingIntent.FLAG_UPDATE_CURRENT); ... alarmMgr.set(AlarmManager.RTC_WAKEUP, time.getTimeInMillis(), pendingIntent); It works fine unless I turn off and turn on the phone. To be more specific, let's say at 10:20, I set an alarm to 10:22 and I turn off and turn on the phone at 10:21, alarm won't work.