New improved Notification Extension

(Tiziano) #1

This extension send a notification in a future time, even if the app is closed and , with a little programming, even if the device was rebooted.
Four types of delay are available, with some properties to adapt them to your current needs.
The notification itself has been kept quite basic, at present, with a title, a message and a standard icon.
A start value can be set and then handled to the app if restarted.
At device reboot, a notification can be launched as a reminder for the user.
The restart of alarms, to be fired after the system reboot,
is easily done if you save them, e.g. in a file or DB, with the data retrieved with the event block and reuse them, when needed, with RestartAlarm block.
Please, be adviced that all alarms are set with setInexactRepeating method. Check the android documentation to understand the reason for this choice and practical consequences (they are not suitable, for example, to program a precise alarm clock).

.
Methods
CancelAnEvent Cancel an event
(idNumber) event identification number

NotifyAtRestart send a notification after device reboot with a fixed text as a reminder,
(notify) true/false

ExecuteOnce Send a notification once, at a certain date
(various params) time and message parameters
(idNumber) event identification number

ExecuteAfterDelay Set a delay in minutes and can repeat the notification
(various params) time and message parameters
(repeat) true/false
(minutesToNextAlarm) time of delay

ExecuteInFixedDay Send a notification once a week, at fixed hour/minutes and repeat it after a week
(various params) time and message parameters
(repeat) true/false
(dayOfWeek) the day of notification: 0 today, 1 Sunday…7 saturday (default is today)

ExecuteFromStartTime Send a notification at a certain hour/minute and can repeat
(various params) time and message parameters
(repeat) true/false
(minutesToNextAlarm) time of delay

RestartAlarm Set again an alarm previously saved, e.g. after a reboot, with the same characteristic of original alarm (this restart is not possible for ExecuteAfterDelay)
(resetAlarm) a list with an alarm data retrieved with AlarmSet

Events
AlarmSet return a list with data of an alarm just set, which could be reused later
(setAlarm) a list with last set alarm data

Properties
MinimumDelay Set the minimum delay between notifications
NotificationPriority Set the priority of notification from 1 to 5 (1 top…5 minimum)
NotificationVisibility Set the visibility of notification from 1 to 3 (1 min…3 maximum)
ShowToast Show an alert when an alarm is set
Sound Set sound on/off for notification
PersistentAlarm Set alarm to wake-up the device and send notification even if the app is closed

com.tiziano1960.seeyoulater.aix (22,9 KB)
Demo
scheduler20.apk (2,2 MB)

18 Likes
Can we send notification when app is closed?
(Choofa) #2

Hi @Tiziano1960 , is this only for alarm function, or can I use this on my shoppinglist, chat and similiar, when ex. when I add something to the list/chat my wife will get the notification that something was added? Is this possible with this?

(Tiziano) #3

You can use as you need, not for alarm though, as has not made for that function

(Philipp Lang) #4

is it possible to save multiple alarms which will work too if a user sshut down the phone and start the phone agai. I know that i can reset an alarm after a restart with the reset component, but what i dont know and understand how do that work when i restart the phone but i dont start my app where the alarms are generated.

I want that the user can set an alarm and if the user restart the phone or shut it down and start the phone again that he also get his alarm without to start the app.

Is that possible with that extension please explain me this.
Thank you

(Gevosoft Official) #5

I really want to use this extension but it doesn’t work on SDK version 28 only on version 22. I know this because Kodular sets the SDK level to 28 by default and then the notifications don’t work but if I use an APK editor app and change the “Target SDK Version” to 22 the notifications works.

1 Like
(Philipp Lang) #6

same here does not work, wanted to use it but after 2 days of work i deleted it.
I hope it will be fixed.