It is necessary that the AlarmManager
be triggered at a certain time. If the phone does not restart, then everything runs smoothly (for example, set at 6 pm, then it works at 6 pm). If you reload, insert in the manifest
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<action android:name="android.intent.action.BOOT_COMPLETED" />
then it will work instantly after a reboot, without - it does not work at all