Hi. I’ve made this extension according to my need to have notifications sent by my app itself, without needing an external operator or service.
So here it is.
You can send notifications with app running in foreground or background , you can choose three styles of notifications (a simple row, a long multi-rows text, multiple messages queued in a single notification).
Every notification has its own id. , so a new one pushed do not cancel a previous one.
The notification can be delayed for some seconds or set at a fixed future time, in format hour and minute, making it easily repeatable.
The blocks are quite self-explanatory about their functions. I hope it would be useful.
How it works:
SetStyle - here you can set the desired style of notification as follow (need a string with one of values below)
-
1 - simple one row notification (string is truncated if it exceeds one row length limitation);only first item of a list of strings is considered
-
2 - multiple rows notification (longest string are fully shown ); only first item of a list of strings is considered
-
3 - multiple messages notification, a list of messages is queued and shown in a single notification
SetDelay - here you can set delay for notifications (need a list of strings with two items)
-
if you want to set an absolute delay it must be in seconds, indicated in the first item, while the second item has a zero in.
Example of delay of 150 seconds (“150”,“0”) -
if you want to set a relative delay it must indicate the hour and minute at which the notification has to be sent. In this case the first list item has a zero in and second the time desired in format HH:MM
Example of execution at 16:45 (“0”,“16:45”)
Notify
title parameter needs a string with notification title
yourMsgList parameter needs a string list with your messages to show (with style 1 and 2 only the first message is relevant)
startValueText param. needs a string null or with a text to pass to Screen1 of your activity when it restarts
isDelayed param. needs true/false values if you desire or not to delay your notifications (if true the delay is that one set by SetDelay property)
SendBackThisApp
simply hides the app from view
example of use of blocks
New file with fixed bug
com.tiziano1960.Notifications.aix (16,7 KB)