title: Android - get remaining time from a pending notification that is repeating periodically
body: <p>I set up a pending notification based on some value the user inserts within the app like this:</p>
  
  <pre><code>val notificationAlarmManager = getSystemService(Context.ALARM_SERVICE) as AlarmManager
              val notificationIntent = Intent(this, ReminderBroadcastReceiver::class.java)
              notificationIntent.putExtra("bytes", bytes)
              val pendingNotificationIntent = PendingIntent.getBroadcast(this, REQUEST_CODE, notificationIntent,
                      PendingIntent.FLAG_UPDATE_CURRENT)
  
              myCalendar.set(Calendar.HOUR_OF_DAY, 10)
              notificationAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP, myCalendar.timeInMillis,
                      NOTIFICATION_OFFSET,
                      pendingNotificationIntent)
  </code></pre>
  
  <p>Since it is a repeating intent I can calculate only the first notification, the ones after can't be calculated.</p>
  
  <p>How can I get the time remaining until the notification will be shown again?</p>