How i can send notification to the user in particular date and time in android? [closed]

You can use this example basically you need to calculate the delay by notificationTime-currentTime
https://www.tutorialspoint.com/how-to-set-an-android-notification-to-a-specific-date-in-the-future

private void scheduleNotification (Notification notification , long delay)
{
    Intent notificationIntent = new Intent( this, MyNotificationPublisher.class);
    notificationIntent.putExtra(MyNotificationPublisher. NOTIFICATION_ID , 1 );
    notificationIntent.putExtra(MyNotificationPublisher. NOTIFICATION , notification);
    PendingIntent pendingIntent = PendingIntent. getBroadcast ( this, 0, notificationIntent,  PendingIntent. FLAG_UPDATE_CURRENT);
    AlarmManager alarmManager = (AlarmManager) getSystemService(Context. ALARM_SERVICE);
    assert alarmManager != null;
    alarmManager.set(AlarmManager. ELAPSED_REALTIME_WAKEUP , delay , pendingIntent) ;
}

if you need the repeat notifications at specific time interval then you can use Alarm Manager https://developer.android.com/reference/android/app/AlarmManager

Leave a Comment