It is necessary to use the message in the onReceive method. How to transfer a message to a method?

PS Installation in AlarmManager takes place in the MainActivity class, the onReceive method is in the AlarmReceiver class.

PSS To make it clearer, a Notification appears in the onReceive () method, in the body of which I need to indicate what the user wanted to receive a reminder about. I need to send this reminder to the onReceive () method.

  • one
    What message? And what kind of onReceive() - a regular psychic again went on vacation - that's beast :) - Barmaley
  • After setting the alarm in the AlarmManager (AlarmManager.set ()), the onReceive () method is called. This happens in the MainActivity class. The onReceive () method is in the AlarmManager class inherited from BroadcastReceiver. I need to pass a "message" to this method when setting the alarm. - Llirik 21

0