示例#1
0
        public override void OnReceive(Context context, Intent intent)
        {
            System.Diagnostics.Debug.WriteLine("BOOT RECEIVER ON RECEIVE");
            alarm.SetAlarm(context);

            if (intent.Action.Equals("android.intent.action.BOOT_COMPLETED"))
            {
                System.Diagnostics.Debug.WriteLine("ACTION EQUALS BOOT COMPLTED");
                alarm.SetAlarm(context);
            }
        }
示例#2
0
 public void Notify(bool b)
 {
     if (b)
     {
         sample.SetAlarm(Forms.Context);
     }
     else
     {
         sample.cancelAlarm(Forms.Context);
     }
 }
示例#3
0
        public override void OnReceive(Context context, Intent intent)
        {
            Logcat.Write("CREATING APP.DATABASE");
            App.Init(new DbSQLite(new SQLite_Android().GetConnection()));

            if (App.Database == null)
            {
                Logcat.Write("DATABASE NULLO");
            }
            else
            {
                Logcat.Write("DATABASE NON NULLO");
            }

            Logcat.Write("BOOT RECEIVER ON RECEIVE");
            alarm.SetAlarm(context);

//            if (intent.Action.Equals("android.intent.action.BOOT_COMPLETED"))
//            {
//                Logcat.Write("ACTION EQUALS BOOT COMPLTED");
//                alarm.SetAlarm(context);
//            }
        }
示例#4
0
 public void BackgroundSync()
 {
     Logcat.Write("**BackgroundSync in Notification_Android");
     sample.SetAlarm(Forms.Context);
     //sample.StartService(Forms.Context);
 }