App Inventor Extensions


Simple Notification Extension

See the App Inventor Extensions document about how to use an App Inventor Extension.

For questions about this extension, bug reports and feature requests, please start a new thread in the App Inventor Extensions forum. Thank you.

Nov 9th, 2015: Version 1 of the Notification Extension released for App Inventor version ai2extensions5 and Companion version 235.cdk1.

Aug 11th, 2016: Version 2a: enable to load icon also from sdcard, avoid DX execution failed error: build each extension separately

Description

Send a notification in n seconds with the corresponding title and text. After restarting the app, you can get the start text from the 'plain start text' block in App Inventor.
Required permissions: none

Notification Style Options


Notification with default Android information icon


Notification with custom icon (available for Android devices 4.1 or up)


Notification with big picture display (available for Android devices 4.1 or up)

Note: As you know, App Inventor apps have some restrictions. Which means for the Notification extension: the app must be still running (at least in the background) to be able to send a notification after n seconds.

Properties


Returns whether Notification Sound should be suppressed.


Specifies whether Notification Sound should be suppressed.


Returns whether big picture should be displayed in Notification.


Specifies whether big picture should be displayed in Notification.


Returns Custom Notification Icon.


Specifies Custom Notification Icon.

Methods


Move task (i.e. the app) to the background.


Send a notifacation in n seconds with the corresponding title and text. After restarting the app, you can get the start text from the 'plain start text' block in App Inventor.
Parameter:
- seconds = the number of seconds
- title = the title of the notification
- text = the subject of the notification
- startText = the text which is provided after restarting the app in the 'plain start text' block

Send Notification Example App

Send a notifacation in n seconds with the corresponding title and text. After restarting the app, you can get the start text from the 'plain start text' block in App Inventor.


Test

Tested successfully on Nexus 5 running Android 6 and Samsung Galaxy Tab 10.1N running Android 4.0.4.

Known Issues

For older Android devices (at least on HTC Desire S running Android 2.3.5) the app could not be terminated before starting it again, which means in this case the start text can't be displayed.

Questions and Answers

Q1: If the application is closed with the home button it works but if it is closed with the back button it doesn't work, can you help me?
A: As workaround just disable the back button, i.e. move an empty Screen.BackPressed event into the working area.

Do you need help with your App Inventor project?

I can help you: for one hour I charge 25 USD.
Please contact me at info [at] puravidaapps [dot] com for details!
For questions about App Inventor, please use the App Inventor forum. Thank you.

Terms and Conditions

Download


If you find this example helpful and you are using it in one of your projects,
be nice and donate a small amount!

Donation amount:

or donate some mBTC to Bitcoin Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Bitcoin

Thank you! Taifun
 

Download TaifunNotification extension (aix file)
Download Notification Example App (aia file)
Back to top of page ...

Creative Commons License
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.


Home | Snippets | Tutorials | Extensions | News | Forums | Links | Search | Contact