[PAID] ⏰ Alarm Manager Extension with Notification or Autostart

Hello Anke.

Can you tell me how to make it send a alarm notification when the app is fully closed.
Its possible to make it open and show a notification to ?

I think I did know if my app is working on a background, how can I see this ?

thanks.

For this extension you have to set the alarm while the app is up and running

You have 2 choices.

  1. start tha app at a given time without notification
  2. display a notification at the given time and after clicking the notification open the app

Taifun

2 Likes

@Vitor_Quelhas ti consiglio l'estensione di @Taifun; difatti la utilizzo e posso confermarti che fa esegue le notifiche in background in maniera ottimale.

1 Like

Thanks very much for the answer, but what I really need its to make it work when the application is closed, like in the second plain.

yes, the extension will send the notification while your app is closed... you might want to read again, what the extension is able to do (protip: see the documentation here App Inventor Extensions: Alarm Manager | Pura Vida Apps)

Alarm Manager Extension to send a notification or autostart the app at a given time only once or repeated by an interval. In case autostart=false then after clicking the notification your app will be started. You can define a start text, which will be passed to your app in method 'get plain start text' and trigger some action after your app is started. Also of course works if your app is not running. The defined alarms will be reinitialized after rebooting the device. You also can define several alarms, just use a different id for each alarm.

everything else is out of scope for this extension

Taifun

Version 6 is now available.

new in Version 6: new method startAtBoot to start an alarm at boot time (i.e. display a notification or autostart the app)

startAtBoot

For details, see my webpage here App Inventor Extensions: Alarm Manager | Pura Vida Apps
Taifun

Hello Taifun, yesterday I bought your extension and it works perfectly, I had even read in this forum of some people that the notification was not shown when the app was minimized, and well, it works for me with the application closed and in the background, I wanted to ask you Something, do you think it is possible for you to make a slight explanation about the .canceled function? For example, how does it behave when the app is closed and when the app is in the background? And some practical case examples. Thank you very much I hope you are very well like your family.

1 Like

thank you... good to hear...

as far as I know, all doubts have been resolved... usually people made an error while using the extension...

from the documntation:

Cancel an alarm using the id you previously used to start the alarm.

Lets assume, you defined a daily alarm with id = 1. Now you changed your plans and you like to cancel that alarm. Just use the CancelAlarm method together with id 1 in this example to cancel that alarm. To cancel an alarm obviously the app must be up and running.

Taifun

Perfect, I don't know why I assumed that this functionality would be related to the user canceling the notification by sliding to the left. Very well! Thanks for your response, the extension works perfectly, 100% recommended.

Hey, I want to send notification with purpose of reminding user to use it again after 12-16 hours of last session.
Can i use this extension to schedule it automatically or do i need any user permission?
Also, does this require any special permission? such as this on android 13

yes
however I do not have an Android 13 device, so up to now I did not test this there...
but you can test it yourself, just try the example project in Google Play
I just uploaded the latest version 6 (it might take a few hours until Google Play refreshes that)
let me know how the example project works for you on Android 13

Taifun

Even I don't have Android 13. It will be nice if anyone can check this on Android 13.

I am testing the extension on both my own app and the alarmmanager test app and notice the followings:

  1. call alarmmanager.Start method seemed not working, I tested interval=ONCE, instance=current time and =current time + some delay). In both cases the alarm was not fired.

  2. call alarmmanager.StartRepeating method only worked if the hour+minute inputs were set to at least one minute passing current time, otherwise the first alarm only fired after the specified interval was passed (e.g. current time is 1602, interval=FIFTEEN_MINUTES, if hour+minute=1602, the first alarm fires only at around 1617, if hour+minute=1603, alarms fire at 1603, then at 1618).

I am testing on Galaxy A40s running Android 11. Any help/suggestions would be appreciated.

Please set the alarm time always to a time in the future... to get a notification immediately use the NotificationStyle extension
.
Taifun

Thanks for your advice. But as I mentioned, using call alarmmanager.Start method with interval=ONCE, alarm was not fired even if I specified a future time. Tested using the sample alarmmanager app.

Show us a screenshot of the example app like this


Important: and close the app after setting the alarm, else the AfterAlarm event will be triggered and you do NOT get a notification

Taifun

I have the same problem, here are my screenshots (sorry for the spanish, but if i change it to english i have to do this all over again)

See here: How to ask a question (open new topic)

Please learn how to work with the clock to set a date and time in the future

You are setting only a time, which results in the first January of 1970 together with your time...


Screenshot_20230925_052435_DuckDuckGo

Taifun

On porpuse i didn't set the date, i want it to work first on the time and it worked it show the startText "Hi" but not the notification, that is my original problem, but okay i set the date and it shows this