New Notification to status bar extension

(Tiziano) #1

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”)

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)

simply hides the app from view

example of use of blocks

New file with fixed bug
com.tiziano1960.Notifications.aix (16,7 KB)

(Red Panda Apps) #2

Thank god you made this, so I don’t have to make a multi-row extension! Maybe you can add an icon to set, because Makeroid upgraded their maxAPI level

(Sander Jochems) #3

This is not possible @Red_Panda. He would need to create the extension with Makeroid and dont make for other AppInventor Builders. Maybe we at Makeroid can create a notification component


Or maybe @Tiziano1960 can donate his sourcecode to Makeroid so it can be incorporated. :wink:

(Red Panda Apps) #5

I know that this feature would be only available at Makeroid. I thought of something like If maxAPIlevel < 24 set specific icon else set notifications icon

(Ben) #6

Whats the point of doing that. Every single component (even if it is not used, is packaged as a part of an app), this will cause a problem, as you will be able to add less and less features to your app. It’s better to keep adding features that arent existing yet, instead of incorporating already existing features…

(Tiziano) #7

There is no problem to give the community, this one and others similar ones, this source code, you could only improve it :smile: If you want I can attach it to your personal email.

(Tiziano) #8

I think I should add action to notification and media style. Maybe I will do it .



I am not a developer of Makeroid. Mayby the @KodularCreator developers can answer if they are interested.

(Tiziano) #10

Arghh… I made a little mistake on style 3, so I attach now the correct aix file in first post. Please excuse me.

(Tiziano) #11

Documentation added (first post)