Essentially, since the application object is created when the application starts and when it receives the BOOT_COMPLETED intent, you can register with AlarmManager in the onCreate method in your custom Application class. Just keep in mind that the application object is created every time a process starts, which includes cases where the process is temporarily killed to save resources. But if you do not change the PendingIntent in any way, it should not be a problem to register again and again.
However, when starting the application, it is impossible to start the application, first there must be some interaction with the user.
source share