New Notification to status bar extension

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)

9 Likes

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

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

1 Like

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

2 Likes

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

1 Like

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…

1 Like

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.

1 Like

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

1 Like

Hi

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

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

1 Like

Documentation added (first post)

2 Likes

hi how r you do you have file media style notification

Link went down I guess…

Here you go:
Old version: com.tiziano1960.Notifications.aix (16.7 KB)
New version: com.tiziano1960.seeyoulater.aix (22.9 KB)

1 Like

Getting this error

Not getting any error. Downloading normally from my post above.

1 Like

the link is not working

You didn’t read the whole topic. A couple of posts above yours is the aix. Next time please read the whole topic before you ask.