コード例 #1
0
        public static void RequestPinShortcut(ShortcutInfo shortcut)
        {
            if (!AreShortCutsSupported)
            {
                return;
            }

            var intent =
                AndroidIntent.Wrap(AGSystemService.ShortcutService.CallAJO("createShortcutResultIntent", shortcut.ajo));

            intent.SetAction(AndroidIntent.ActionCreateShortCut);
            var pendingIntentSender = AndroidPendingIntent.GetActivity(intent.AJO, AGUtils.RandomId()).CallAJO("getIntentSender");

            AGSystemService.ShortcutService.CallBool("requestPinShortcut", shortcut.ajo, pendingIntentSender);
        }
コード例 #2
0
 public static void SetExact(AndroidIntent intent, DateTime when, int id)
 {
     AGSystemService.AlarmService.Call("setExact", RTC_WAKEUP, CalcMillis(when),
                                       AndroidPendingIntent.GetBroadcast(intent.AJO, id));
 }
コード例 #3
0
 public static void Cancel(AndroidIntent intent, int id)
 {
     AGSystemService.AlarmService.Call("cancel", AndroidPendingIntent.GetBroadcast(intent.AJO, id));
 }
コード例 #4
0
 public static void SetRepeating(AndroidIntent intent, DateTime when, long intervalMillis, int id)
 {
     AGSystemService.AlarmService.Call("setRepeating", RTC_WAKEUP, CalcMillis(when), intervalMillis,
                                       AndroidPendingIntent.GetBroadcast(intent.AJO, id));
 }