Como mostrar a notificação local a cada hora usando o serviço

Quero mostrar uma notificação local a cada hora ou segundos específicos usando o serviço. Tentei implementar essa funcionalidade, mas não obtive sucesso.

Meu código é como abaixo

AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);

        Intent notificationIntent = new Intent("android.media.action.DISPLAY_NOTIFICATION");
        notificationIntent.addCategory("android.intent.category.DEFAULT");

        PendingIntent broadcast = PendingIntent.getBroadcast(this, 100, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);

        Calendar cal = Calendar.getInstance();
        Log.d("day for notification:::", String.valueOf(notification_day));

            cal.add(Calendar.MINUTE, notification_day);
alarmManager.setRepeating(AlarmManager.RTC, cal.getTimeInMillis(), 4 * 60 * 60, broadcast);

questionAnswers(1)

yourAnswerToTheQuestion