Android AlarmManager: how to find out the time remaining to trigger the PendingIntent
问题 I am developing an alarm clock app. Below I have a function to set the alarm. But I want to know how to find the remaining time AlarmManager to trigger the PendingIntent. For example, it is now 10:00 am, and set the AlarmManager to trigger the PendingIntent 23:00, and the calculations we know that the PendingIntent will be called here 13 hours. But how to find out this time remaining? Sorry for my poor english. And I thank you for your attention String schedule = "23:00"; //example Calendar