Hi, I want my application to start at a specific time every day. I use the code below for this. But it works only once. What a mistake here, how can I achieve this.
AlarmManager alarmMgr0 = (AlarmManager)getSystemService(Context.ALARM_SERVICE); Intent intent0 = new Intent(this, ActivityStarter.class); PendingIntent pendingIntent0 = PendingIntent.getBroadcast(this, 0, intent0, 0); Calendar timeOff9 = Calendar.getInstance(); timeOff9.set(Calendar.HOUR_OF_DAY, 16); timeOff9.set(Calendar.MINUTE, 13); timeOff9.set(Calendar.SECOND, 0); alarmMgr0.setRepeating(AlarmManager.RTC_WAKEUP, timeOff9.getTimeInMillis(),24*60*60*1000,pendingIntent0);
Any help please.
android android-alarms
Ida shahid
source share