it was at the beginning of the year, then i made notifications work on Samsung, on Redmi and then they didn't work. now the extension version is 10, so i checked if it works or not. all permissions are granted (notifications, battery optimization with your BatteryOptimization extension, autostart), when you click GetAllAlarms, the data in json format is received, but there is no notification. but on Samsung it works fine
As you can see yourself, you have a device specific problem.
The alarmmanager extension offers a lot of options. My recommendation is to start as simple as possible and use the SimpleNotification project as a start. Please see the documentation. Use the apk file simple apk from the download folder. This example requires only PostNotification permission.
Get that example running on your Redmi first before continuing and try these device specific adjustments manually in the settings
Taifun
it all turned out to be in vain. we can't register 5 signals at different times (for example 12:00, 13:00, 14:00, 15:00, 16:00) if the current time on the clock is later than the specified one. this makes the extension useless for me unfortunately..
we can use this block, but I can't divide the time because I get the whole time from the api (fajr":"04:59","zuhr":"12:30","magrib":"17:13","isha":"18:43","), for example 12:00, and for the elshl block the hours and minutes are separate
Well, obviously it only makes sense to set alarms in the future... you could have some logic to do that...
Generally your method of working is very erratically... what about working step by step in a structured way? Don't confuse yourself. And keep it simple.
For your prayer app every day the prayer times are changing. What about writing a procedure, which gives you only the next prayer time? Then set the alarm to that time. And after an alarm gets triggered, get the next prayer time, etc. This process will work as long as there is internet access available.
Taifun
what is the answer result of this block? true? does it trigger when a notification appears?
If you have doubts, the first thing you should do is to check the documentation at App Inventor Extensions: Alarm Manager | Pura Vida Apps
Everyone else who bought the extension is able to do it... give it a try yourself next time..
And now let's read the documentation together
Btw. Recently I mentioned twice how to use the Started event, now I repeat it the third time
See again my simple example...
This is how a result in event Started can look like
Taifun
after a day of testing on two phones, Samsung (Android 11) and Redmi 12 (Android 14) notifications come only on Samsung (the same application is installed on both phones) on Redmi all permissions are provided (battery optimization is disabled, autostart is enabled, all notifications are enabled, display on top of windows) but the message does not come no matter what I do. pity.. most likely the extension needs to be improved for. but in principle on low Androids everything works well.
I don't know what they tested it on (Tested successfully on several devices starting from Android 5 up to Android 14. Thank you @Anke and @Peter for your tests). but it doesn't start on Android 14
if there was a mistake on my part, the application would not work on Android 11
We already talked about it, read again this
First get the simple project running on your device before continuing!
It would be wise to ask for only those permissions you need for your app
And you have to ask for permissions one by one, NOT everything at the sane time as you did it here
See my lockscreen example project how to do it using a clock
Taifun
Dear Taifun your extension is great, but apparently Android has introduced some restrictions. Android's protection has been updated twice in two months. I've done a lot of testing with both your demo apk and my app. The thing is that notifications come if you set the notification timer for 1, 2, 3 minutes. But if you set the notification timer for 10 minutes or more, the notifications don't come.
It would be wise to ask for only those permissions you need for your app
And you have to ask for permissions one by one, NOT everything at the sane time as you did it here
this was before. now they are enabled in the application settings one by one
Now I set the notification timer again for 1 minute, and the notification came immediately. I set the timer for 5 minutes. The notification did not come.I don't know why this happens
there is also one nuance, sometimes notifications with a timer of 1-5 minutes come not at the specified time but after 20 minutes. but this is rare and only on android 14. and on samsung everything is super
Can you post your Redmi MIUI Software version?
Please post the version number as text, translated. It may be useful to identify the problem.
android version 14 UP1A.231005.007 Android Security Update 2024.09.01
OS version 1.0.7.0.UMXRUXM
The simple example sets an alarm for 9am every day... did you disable battery optimization as suggested earlier?
Can you show us a screenshot of your settings?
Also please check Xiaomi | Don’t kill my app! for further configuration options for your Redmi device
Taifun
yes
This is the difference between exact and inexact alarns, see again the documentation
Note : Google recommends to use exact alarms wisely to reduce battery consumption. See also Use cases that might not require exact alarms. If you decide to use exact alarms, then the user needs to grant the SCHEDULE_EXACT_ALARM permission, see method AskForScheduleExactAlarmPermission below.
Taifun
I repeat, all permissions are granted, autostart is also allowed
I see that your device is running HyperOS (not the usual MIUI that runs on Xiaomi devices). I found this online:
This strongly suggests towards a device specific behavior, considering the fact that this extension works on other devices running Android 14. You should research more about your phone's (software's) settings.
There aren't many things that can be done to solve this issue in perspective of this extension. Most problems when it comes to background operations are device centered. I've come across many such instances where the background functionality dosent work for no reason on Chinese ROMs, and the solution is often hidden in a obscure varying place lying undocumented.
Here's one more thing you can try:
Open application → Go to recent apps → Lock your app
Thank you @Kumaraswamy !
I now also did a Google search for hyperOS notification problem
https://www.google.com/search?q=hyperos+notification+problem
and quite a few results came up, for example
@Emissary95 A Google search is something you could have easily done yourself for your exotic OS...
Taifun
I think no one will install such an application where you have to spend two hours setting it up after installation) thanks, I'll try tomorrow
yes I agree
it is you, who has a device with that exotic OS... you could be the one, who describes not only for the user of your app but also for us what exactly needs to be done for HyperOS... as you can see after doing a Google search, this is a common problem on these devices...
Taifun