Listens to iOS events when app comes to foreground or disappears. This is for example used to register/deregister timers.
 public iOSSimpleTimer()
 {
     timers = new List<NSTimer>();
     templates = new List<TimerTemplate>();
     if (UseApplicationActivationListener) {
         applicationActivationListener = new ApplicationActivationListener();
         applicationActivationListener.OnActivatedAction = () => {
             TriggerTimerActions();
             RescheduleTimers();
         };
         applicationActivationListener.OnWillResignActiveAction = () => {
             UnscheduleTimers();
         };
     }
 }
Exemplo n.º 2
0
 public iOSSimpleTimer()
 {
     timers    = new List <NSTimer>();
     templates = new List <TimerTemplate>();
     if (UseApplicationActivationListener)
     {
         applicationActivationListener = new ApplicationActivationListener();
         applicationActivationListener.OnActivatedAction = () => {
             TriggerTimerActions();
             RescheduleTimers();
         };
         applicationActivationListener.OnWillResignActiveAction = () => {
             UnscheduleTimers();
         };
     }
 }