コード例 #1
0
 public override void OnCreate()
 {
     base.OnCreate();
     Toast.MakeText(Forms.Context, "Test Service", ToastLength.Long).Show();
     alarmReceiver = new AlarmReceiver();
     RegisterReceiver(alarmReceiver, new IntentFilter(Intent.ActionBootCompleted));
 }
コード例 #2
0
 public override void OnDestroy()
 {
     UnregisterReceiver(alarmReceiver);
     alarmReceiver = null;
 }