private void SendAlarmCode(EnumMIPCControlErrorCode alarmCode)
 {
     try
     {
         WriteLog(3, "", String.Concat("SetAlarm, alarmCode : ", ((int)alarmCode).ToString(), ", Message : ", alarmCode.ToString()));
         alarmHandler.SetAlarm((int)alarmCode);
     }
     catch (Exception ex)
     {
         WriteLog(1, "", "SetAlarm失敗, Excption : " + ex.ToString());
     }
 }
Exemple #2
0
        public override StartCommandResult OnStartCommand(Intent intent,
                                                          StartCommandFlags flags, int startId)
        {
            int messageID = 90000;

            var          notifMngr    = new NotificationManagerDroid();
            Notification notification = notifMngr.ReturnNotification(
                "Positions Service", "Die überwachung der Position für die" +
                " automatische Prüfung der Anwesenheit läuft!");

            StartForeground(messageID, notification);

            alarm.SetAlarm();

            return(StartCommandResult.Sticky);
        }