Hi i've been researching the alarm manager in android and was wondering if there how to set a specific time for an alarm (or could use notification manager)to go off at a specific time for example 12pm tomorrow . The code below sets the alarm for 5 seconds from now so to set it for something like 12 pm could you do something like 12:00:00 or something?
Intent intent = new Intent(this, OnetimeAlarmReceiver.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, REQUEST_CODE, intent, 0);
AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (5 * 1000), sender);
Toast.makeText(this, "Alarm set", Toast.LENGTH_LONG).show();