Name
ShowNotification -- show system notification (V8.0)
Synopsis
ShowNotification(title$, msg$[, table])
Function
This function can be used to pop up a system notification box that shows the message passed in msg$ to the user. The notification box will use the title specified in title$. If you pass an empty string ("") in the title$ parameter, the notification will use the title specified in the @APPTITLE preprocessor command.

The optional table argument can be used to configure further parameters for the system notification. The following tags are currently recognized by the table argument:

Icon:
This tag can be used to set the icon that should be shown inside the notification box if the host system supports it. The following icon types can currently be specified here:

#REQICON_NONE:
No icon
#REQICON_INFORMATION:
An information sign
#REQICON_ERROR:
An error sign
#REQICON_WARNING:
A warning sign
#REQICON_QUESTION:
A question mark

Note that not all platforms support this tag.

Timeout:
This tag can be used to specify a timeout in milliseconds for the notification. If this tag is set, the notification will disappear after the specified time (in milliseconds) has elapsed. Otherwise the notification will use the host system's default timeout value for notifications. You can also pass one of the following special constants here:

#DURATION_SHORT:
Use this for a short notification.

#DURATION_LONG:
Use this for a long notification.

Note that on Android, you must pass one of the special constants listed above. Passing a millisecond value directly isn't supported on Android. Also note that not all platforms support the Timeout tag.

X:
Desired horizontal position for the notification. This can also be one of Hollywood's special coordinate constants like #CENTER. This tag is only supported on Android and iOS.

Y:
Desired vertical position for the notification. This can also be one of Hollywood's special coordinate constants like #CENTER. This tag is only supported on Android and iOS.

NoSound:
Set this tag to True if you don't want any sound to accompany the notification. This tag is currently only supported on macOS.

Note that on Windows notifications can only be shown if your application has a tray icon. Thus, ShowNotification() will automatically add a tray icon for your application if there is none yet. If you would like to manually install a tray icon for your application on Windows, call SetTrayIcon() before calling ShowNotification(). See SetTrayIcon for details.

Also note that on AmigaOS 4 ShowNotification() is implemented through application.library's Ringhio system and thus can only be used if your script has registered itself as an AmigaOS 4 application using the RegisterApplication tag in @OPTIONS. If you need fine-tuned control over Ringhio messages and you don't need to be portable, you can also use the ShowRinghioMessage() function on AmigaOS 4 instead because this offers even more configuration options. See ShowRinghioMessage for details.

On MorphOS ShowNotification() uses MagicBeacon's notification system. On AmigaOS 3 Ranchero is used for showing notifications. Note that since apps need to register before they can show notifications with Ranchero it's recommended that if you intend to use ShowNotification() on AmigaOS 3 with Ranchero you should also use @APPIDENTIFIER to specify a unique ID for your app. Otherwise the generic app name "Hollywood" will be used.

Inputs
title$
desired title for the notification or empty string for default title
msg$
desired message text for the notification
table
optional: table containing further configuration parameters (see above)

Show TOC