It is clear that this is just a tutorial on how itoo works, the alarm thing is an example, I have already published an itoo tutorial with the Pedometer component and another creating a streaming radio station player that never cuts out.
To set an alarm, as you say, an extension that uses android.app.AlarmManager is better, but it could work perfectly for a short timer.
I have tested the compiled application with alarms for up to three days and it has not failed (the best thing about the app is the reliability in the exact time of the alarm), I have a Xiaomi phone so I have had to put the energy saving system energy as "Unrestricted"
Regarding battery consumption, it may increase battery consumption by 3%, more or less like any other background service.
As I said before, for an alarm app it is better to use your extension or any that uses android.app.AlarmManager
Indeed, if a new alarm is checked every second, it would be very costly for the system.
I have modified this aspect and now the Timer has an interval equal to the time to the next alarm, which could be 10 seconds or 3 days, so the system is released and there is no problem of forcing it
If the next alarm is in 5 hours and 10 minutes, that would be the Timer interval
For this I have made the following modifications in the aia
As can be seen when the service starts, the Timer has an interval equal to the time we have in the database to which we add the system time (all in milliseconds)
When the Timer verifies that there is a new alarm, it does everything indicated in the first post and also sets its interval to 1 second, in order to receive the response of the activity for which the alarm has already arrived.
Once the service receives this response, if there is a new alarm, it sets the timer interval to the time left for the new alarm. If there were no more alarms, it would turn off the service.
First of all I congratulate you on your alarm manager using the Itoo service. But I ask you a curiosity of mine; How did you make the TimePicker prettier than the traditional one?
Greetings
Nicola
The strange thing is that now, even though I keep trying to change the TimePicker theme from Classic to default device; I am irremediably left with the classic theme
The strange thing is that now, even though I keep trying to change the TimePicker theme from Classic to default device; I am irremediably left with the classic theme
Hello, I've find the extension (Notifybasci : Simple Notify in status bar, Extension Version: 1, Date Built: 2024-01-04) in an application and I want to download it, thanks
Alarm Manager with Itoo made by @Mario1
this application include the extension I need (Notifybasic), thanks.
Hello and thanks for your awesome work - I'm a beginner I tried to download your work and opening with the simulator displays the home screen then there was this error - I tried to install on XIAOMI Redmi Note 13 with Android 15 AQ3A and launching the program presents a white screen with nothing else - Am I making mistakes? Can you help me? Thanks for your time
Est il possible d'ajouter un texte dans la ListeWiew, en plus de l'heure de déclanchement de l'alarme, pour indiquer ce qu'il y aurait à faire au déclanchement d'alarme, par exemple "anniversaire de..."ou "fête de... " Ou "rendez-vous à..." etc.
Et surtout, pouvez vous me donner une direction à prendre pour modifier votre .aia pour réaliser ce genre de renseignement d'alarme, si c'est possible ?
The example by Mario is not really made to be kept running for several days.
Let me recommend you to use a real alarmmanager for those purposes
There is a free alarmmanager available, which offers basic functionality (do a search in the community) and there is my paid alarmmanager available, which offers additionally advanced functionality.
Both can display a notification message of your choice. You have to set the message while defining the alarm. My alarmmanager additionally is able to dynamically set the message at alarm time among other things.
Merci Taifun
J'ai fait cette recherche qui ne m'as malheureusement pas conduit à ce que vous me proposez , je n'ai pas dû chercher comme il faut, dommage.
S'il vous plaît, pourriez vous mettre le lien de ce que vous me proposez, je vous en serais reconnaissant