[Android Q&A, Help & Troubleshooting] I love apps:
I want to make a snooze action button for the notification that when the user taps on it the notification will disappear and reappear after an hour and one cancel action button that when it is taped the notification will be canceled and reappear the next day again. I tried to do it with opening two new activities but I can't figure out how can be done. Any ideas for how can I do this? Here is the code: Main Activity:

EditText write;
Button notification;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

notification = findViewById(R.id.notification);
write = findViewById(R.id.write);

notification.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(System.currentTimeMillis());
calendar.set(Calendar.HOUR_OF_DAY, 12);
calendar.set(Calendar.MINUTE, 57);
calendar.set(Calendar.SECOND, 0);
Intent intent = new Intent(getApplicationContext(), Notification_receiver.class);
intent.putExtra("TEXT", String.valueOf(write.getText()).trim());

PendingIntent pendingIntent =PendingIntent.getBroadcast(getApplicationContext(), 100, intent, PendingIntent.FLAG_UPDATE_CURRENT);

AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);

}
});

}

And here the Broadcast Receiver:

public class Notification_receiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {

String text = intent.getStringExtra("TEXT");

NotificationManager notificationManager = (NotificationManager)context.getSystemService(context.NOTIFICATION_SERVICE);

Intent repeating_intent = new Intent(context, MainActivity.class);
repeating_intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
repeating_intent.putExtra("action","snooze");
repeating_intent.putExtra("action","cancel");
PendingIntent pendingIntent =PendingIntent.getActivity(context, 100, repeating_intent, PendingIntent.FLAG_UPDATE_CURRENT);

Intent snoozeintent = new Intent(context, ActionBtnReceiver.class);
snoozeintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
snoozeintent.putExtra("action","snooze");
PendingIntent snzpendingIntent = PendingIntent.getActivity(context, 100, snoozeintent, PendingIntent.FLAG_UPDATE_CURRENT);

Intent cancelintent = new Intent(context, ActionCancelBtnReceiver.class);
cancelintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
cancelintent.putExtra("action","cancel");
PendingIntent cnlpendingIntent =PendingIntent.getActivity(context, 100, cancelintent, PendingIntent.FLAG_UPDATE_CURRENT);

NotificationCompat.Builder builder = new NotificationCompat.Builder(context)
.setContentIntent(pendingIntent)
.setSmallIcon(R.drawable.ic_launcher_background)
.setContentTitle("Notification")
.setContentText(text)
.setAutoCancel(true)
.addAction(R.drawable.ic_snooze_black_24dp, "Snooze", snzpendingIntent)
.addAction(R.drawable.ic_cancel_black_24dp, "Cancel", cnlpendingIntent);
notificationManager.notify(100, builder.build());

}

The ActionBtnReceiver and ActionCancelBtnReceiver are empty because I don't know how to do it. Can you please help me?