[PAID] ⏰ Alarm Manager Extension with Notification or Autostart

Version 7b has just been released

now the extension does not use SetExact anymore, because according to the Google recommendations Applications are strongly discouraged from using exact alarms unnecessarily as they reduce the OS's ability to minimize battery use.

Please find the updated version 7b in the download folder

Taifun
PS: @Tammi_Allen thank you for your report

1 Like

This extension only works on some phone models. When I bought this extension in 2021 it worked well. but since 2022 it has stopped showing messages. wasted money. (the test apk file that Taifun sends also does not work on Samsung A10 Android 11)

Google updates the Android system from year to year and so also extensions need to be updated to still work. I not only keep the extension up to date to follow the new restrictions from Google, I also provide the updates for free.

The only thing you have to do is to update to the latest version of the extension and adjust your code to follow the latest Google rules. It looks like you failed to do this.

If your app stopped showing messages, you now have to request post notifications permission. Read the documentation and check the updated example project about how to do it.

Please be more specific to get help. Which device manufacturer do you have problems with? Probably Xiaomi? See also Q3 here App Inventor Extensions: Alarm Manager | Pura Vida Apps

Taifun

Thankyou for the update Taifun. It appears to work now for notices and autostarts.

A couple of quick questions..

  1. Can the program be autostarted without opening the screen on top?
  2. Are the alarms lost when the phone reboots?

what is your use case? This might be possible in combination with the itoo extension... you might want to say more about what you need and I can think about how to get it running...

no
from the documentation at App Inventor Extensions: Alarm Manager | Pura Vida Apps

The defined alarms will be reinitialized after rebooting the device.

Taifun

I wrote to you on which phone it doesn’t work at all or are you deliberately ignoring it. I used your apk file that you sent me by email (the updated file is the latest), it does not work.

I now checked again my personal messages... we had a conversation in April 2023... you had problems with a Samsung A10 and you did not get an alarm at the given time, my answer was

In your test app there is missing

  • the close application block to get a notification if the app was closed
  • the AfterAlarm event to display something if the app was not closed

and, as you did not close the application

...it was still active and not really closed, in this case the AfterAlarm event fires... however if you do not use it, nothing happens

then in your last message you tried to create an alarm but had issues to create an instant of time. My answer was

yióu have to use this format MM/dd/YYYY hh:mm:ss, see also the documentation of the MakeInstant block
http://ai2.appinventor.mit.edu/reference/components/sensors.html#Clock

Returns an instant in time specified by MM/dd/YYYY hh:mm:ss or MM/dd/YYYY or hh:mm.

you always can check, if an alarm is returned in the GetAlarm method...

also see again my answer from here...

you will have to keep the extension version up-to-date... if you do not do this, then it might not work anymore because Google might have added another restriction...

after April 2023 I did not hear anything anymore from you up to now...

if you still have problems to create an instant of time. let me suggest to also check the clocks tutorial here

and if you still have issues, what about contacting me again? I had to assume, you solved your issues... try the current example project from the download folder, try it on your test devices, enable post notifications permission and let us know, if it works for you on your devices.

Taifun

So basically after the notice is displayed I wish to run the program again, picking a random time for the next message and then set the next alarm/notice. I'm not using a normal random number generator so it would be beneficial to run at the time of each previous alarm without opening the screen interfering with the user.

I want the user to be able to tap on the message to provide input specific to that message (I.e. up/down vote) Which can be accomplished with the return text. SO I don't know if using a second extension would cause an issue with returning the start text. Also once the programs is started I want to endlessly do its thing.

Otherwise, I was thinking of doing an auto-start once per day to generate all the random times for messages that day, but it not my first choice.

good afternoon dear Taifun! I'm tired of repeating to you I TESTED YOUR APK FILE which you sent me in an update by email, do you understand me? The extension does not work on Samsung. (I abandoned my project and haven’t used your extension since then because it doesn’t work)

Chechnya, sometimes there could be device imposed restrictions, check here: Samsung | Don’t kill my app!

What is your Android version? Model?

1 Like

samsung a10 android 11

3 Likes

Kumaraswamy, now it works

1 Like

That's why you shouldn't be so hasty when you assume that something (e.g. an extension) is faulty. Google and many Android device manufacturers are constantly harassing you with new restrictions and additional battery saving options that are almost impossible to avoid or can no longer be turned off.


The whole madness started with and after the introduction of Doze Mode with Android 6. And it's gotten worse every year since then.

But of course everything is in our best interest. :wink:

3 Likes

That's right, most of these manufacturers add their own so called "battery savers" that aims to save battery by limiting the software capabilities.

On Samsung this was a big problem for Android 10-11 phones. On Chinese phones, it's been the worst for ever, they tend to auto disable every background execution features by default, unless your app is a very popular ones like "Whatsapp" where you would be automatically whitelisted by the device.

Hopefully Google has promised to unify system behaviors for all the Androids out there (time will tell us how it turns out, nothing great achieved so far)

1 Like

I wouldn't bet a cent on promises and positive developments for users from Google.

1 Like

I would like to apologize for the unfounded accusations against Taifun, the extension works well, the whole problem turned out to be in the phone settings. I also want to say thank you to Kumaraswamy for telling me where I was wrong

2 Likes

Perhaps when autostart is called I could just run the functions I need to run and then end the program. Hopefully minimizing disruption of the user experience.

It looks like itoo background functions might be stopped. I want it to run without fail. If itoo background processes are called on a regular basis will that prevent them from being stopped by the system and battery savers?

Hi, what exactly do you want to get done?

  • You want to perform an operation when the message is shown without opening the screen that would cause user disruption, is this what you are talking about?
  • And while doing that operation you would also decide the next time to set for the Alarm, am I right?

Yes, I need to run a function when the alarm is activated and also set the next alarm without opening the screen or disrupting the user experience.

1 Like