Alarm extension

He! About alarm extension: I did a free and whith no advertisements wake up application in order to have morning prayers at wake up. In the evening I set the alarm to play at a given hour tomorrow mornig. At the predetermined time the app plays mp3 containing prayers. At the moment The app works well but only if I set the alarm within few hours, but if I set the alarm in order to play tomorrow morning it do not works. Is there any extension able to let work my app till tomorrow morning? I am not skill to use it, will someone be so kind to complete the bloks editor inserting the extension?

I did three versions of my wake up, the first at wake up plays random mp3 bible passages, the second plays a sequence of mp3, the third plays a unique mp3 file containig all the prayers. I upload them to let you see, to understand if you can solve my porpose. I have deleted some mp3 in order to lighten the aia file and to make it possible to upload them.

Thank you very muchPreghiera_sveglia.aia (170.0 KB) Sveglia_con_le_preghiere.aia (2.3 MB) SvegliaConLaParola_di_Dio_3.aia (3.2 MB)

I just looked into your first example project... you did not use an extension... you are using the clock component to play a mp3 file at a given time... this will not work anymore after your device goes to sleep...

a simple solution would be to keep the screen on, which prevents the device from going to sleep... my tools extension App Inventor Extensions: Tools | Pura Vida Apps and its KeepScreenOn method could do it, however keeping the screen on will drain faster your battery of the device...

another method could be to use an extension to start your app at a given time... my alarm manager extension with notification is able to display a notification at a given time App Inventor Extensions: Alarm Manager | Pura Vida Apps however this extension is not able to open your app... also Google will put more and more restrictions on this, see also Q2 there App Inventor Extensions: Alarm Manager | Pura Vida Apps

taken from here

Android 10 (API level 29) and higher place restrictions on when apps can start activities when the app is running in the background. These restrictions help minimize interruptions for the user and keep the user more in control of what's shown on their screen. In nearly all cases, apps that are in the background should display time-sensitive notifications to provide urgent information to the user instead of directly starting an activity.

Also starting from Android 10 the app must have been granted the SYSTEM_ALERT_WINDOW permission by the user to be able to restart itself from the background. And in Android 11 this has been even restricted further.

the alarm manager extension by Atom Developer is able to start an app at a given time... however I do not know if this also works in MIT App Inventor...



Taifun thank you very much !