'Send pendingIntent to BootReceiver from alarm manager

I hope you're doing great. Please, is possible to send a pendingIntent from AlarmManager to BootReceiver? I created a class in which I set Alarm manager and in this class, the alarm is set in a method and because I need to call this method in my ViewModel class, I created the class as object. The method has three parameters : a context, a todo object and a list of days. I used Broadcast receiver to trigger the alarm. Now, in order to manage losing the scheduled alarm when the device is booted, I created a BootReceiver class and normally, I need to set the alarm again in this class but I don't know how I can proceed. I wanted to call the method that schedules the alarm in this class but I don't know how to get the arguments the method needs in BootReceiver class

For this reason, I would like to know if it's possible to create another pendingIntent in the method and sent it to the BootReceiver exactly like I did for AlarmReceiver class.

Thank you in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source