Class ShadowAlarmManager


  • @Implements(android.app.AlarmManager.class)
    public class ShadowAlarmManager
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ShadowAlarmManager.ScheduledAlarm
      Container object to hold a PendingIntent and parameters describing when to send it.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void cancel​(android.app.AlarmManager.OnAlarmListener listener)  
      protected void cancel​(android.app.PendingIntent operation)  
      protected android.app.AlarmManager.AlarmClockInfo getNextAlarmClock()  
      ShadowAlarmManager.ScheduledAlarm getNextScheduledAlarm()  
      java.util.List<ShadowAlarmManager.ScheduledAlarm> getScheduledAlarms()  
      ShadowAlarmManager.ScheduledAlarm peekNextScheduledAlarm()  
      static void reset()  
      protected void set​(int type, long triggerAtTime, android.app.PendingIntent operation)  
      protected void set​(int type, long triggerAtTime, java.lang.String tag, android.app.AlarmManager.OnAlarmListener listener, android.os.Handler targetHandler)  
      protected void setAlarmClock​(android.app.AlarmManager.AlarmClockInfo info, android.app.PendingIntent operation)  
      protected void setAndAllowWhileIdle​(int type, long triggerAtTime, android.app.PendingIntent operation)  
      protected void setExact​(int type, long triggerAtTime, android.app.PendingIntent operation)  
      protected void setExact​(int type, long triggerAtTime, java.lang.String tag, android.app.AlarmManager.OnAlarmListener listener, android.os.Handler targetHandler)  
      protected void setExactAndAllowWhileIdle​(int type, long triggerAtTime, android.app.PendingIntent operation)  
      protected void setInexactRepeating​(int type, long triggerAtMillis, long intervalMillis, android.app.PendingIntent operation)  
      protected void setRepeating​(int type, long triggerAtTime, long interval, android.app.PendingIntent operation)  
      protected void setTimeZone​(java.lang.String timeZone)  
      protected void setWindow​(int type, long windowStartMillis, long windowLengthMillis, android.app.PendingIntent operation)  
      protected void setWindow​(int type, long windowStartMillis, long windowLengthMillis, java.lang.String tag, android.app.AlarmManager.OnAlarmListener listener, android.os.Handler targetHandler)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowAlarmManager

        public ShadowAlarmManager()
    • Method Detail

      • reset

        @Resetter
        public static void reset()
      • setTimeZone

        @Implementation
        protected void setTimeZone​(java.lang.String timeZone)
      • set

        @Implementation
        protected void set​(int type,
                           long triggerAtTime,
                           android.app.PendingIntent operation)
      • set

        @Implementation(minSdk=24)
        protected void set​(int type,
                           long triggerAtTime,
                           java.lang.String tag,
                           android.app.AlarmManager.OnAlarmListener listener,
                           android.os.Handler targetHandler)
      • setExact

        @Implementation(minSdk=19)
        protected void setExact​(int type,
                                long triggerAtTime,
                                android.app.PendingIntent operation)
      • setExact

        @Implementation(minSdk=24)
        protected void setExact​(int type,
                                long triggerAtTime,
                                java.lang.String tag,
                                android.app.AlarmManager.OnAlarmListener listener,
                                android.os.Handler targetHandler)
      • setWindow

        @Implementation(minSdk=19)
        protected void setWindow​(int type,
                                 long windowStartMillis,
                                 long windowLengthMillis,
                                 android.app.PendingIntent operation)
      • setWindow

        @Implementation(minSdk=24)
        protected void setWindow​(int type,
                                 long windowStartMillis,
                                 long windowLengthMillis,
                                 java.lang.String tag,
                                 android.app.AlarmManager.OnAlarmListener listener,
                                 android.os.Handler targetHandler)
      • setAndAllowWhileIdle

        @Implementation(minSdk=23)
        protected void setAndAllowWhileIdle​(int type,
                                            long triggerAtTime,
                                            android.app.PendingIntent operation)
      • setExactAndAllowWhileIdle

        @Implementation(minSdk=23)
        protected void setExactAndAllowWhileIdle​(int type,
                                                 long triggerAtTime,
                                                 android.app.PendingIntent operation)
      • setRepeating

        @Implementation
        protected void setRepeating​(int type,
                                    long triggerAtTime,
                                    long interval,
                                    android.app.PendingIntent operation)
      • setInexactRepeating

        @Implementation
        protected void setInexactRepeating​(int type,
                                           long triggerAtMillis,
                                           long intervalMillis,
                                           android.app.PendingIntent operation)
      • setAlarmClock

        @Implementation(minSdk=21)
        protected void setAlarmClock​(android.app.AlarmManager.AlarmClockInfo info,
                                     android.app.PendingIntent operation)
      • getNextAlarmClock

        @Implementation(minSdk=21)
        protected android.app.AlarmManager.AlarmClockInfo getNextAlarmClock()
      • cancel

        @Implementation
        protected void cancel​(android.app.PendingIntent operation)
      • cancel

        @Implementation(minSdk=24)
        protected void cancel​(android.app.AlarmManager.OnAlarmListener listener)