Notifier

Non-Visible component
Category Requires Version
User Interface API 19, Android 4.4 - 4.4.4 KitKat 11

Overview

The Notifier component displays alert dialogs, messages, and temporary alerts, and creates Android log entries through the following methods:

  • ShowMessageDialog: displays a message which the user must dismiss by pressing a button.
  • ShowChooseDialog: displays a message two buttons to let the user choose one of two responses, for example, yes or no, after which the AfterChoosing event is raised.
  • ShowTextDialog: lets the user enter text in response to the message, after which the AfterTextInput event is raised.
  • ShowPasswordDialog: lets the user enter password in response to the message, after which the AfterTextInput event is raised.
  • ShowAlert: displays a temporary alert that goes away by itself after a short time.
  • ShowProgressDialog: displays an alert with a loading spinner that cannot be dismissed by the user. It can only be dismissed by using the DismissProgressDialog block.
  • CustomMessageDialog: New version to display dialogs with icon and in fullscreen mode.
  • CustomChooseDialog: New version to display choose dialogs with icon and in fullscreen mode.
  • LightTheme: To display the dialogs in a light or dark theme.
  • ShowLightbox: Displays a png or gif file from assets or from web url in a dialog.
  • ShowLinearProgress: Shows a progress dialog with a horizontal progress bar.
  • ShowSpinningProgress: Shows a spinning progress dialog.
  • UpdateProgress: Change the current value of the linear progress dialog.
  • ShowRadioListDialog: Shows a radio list dialog with a list of options.
  • ShowCheckboxListDialog: Shows a picker dialog with a list of options.
  • ShowListPicker: Shows a list picker dialog.
  • ShowTextInputDialog: Show a text input dialog.
  • ShowImageDialog: Show a image dialog. Animation types like "*.gif" are not supported.
  • ShowNumberPicker: Shows a number picker dialog that enables the user to select a number from a predefined range.
  • ShowWordPicker: Shows a word picker dialog that enables the user to select a number from a predefined word.
  • DismissProgressDialog: Dismisses the progress dialog displayed by ShowProgressDialog.
  • DismissSpinningProgress: Dismisses the progress dialog displayed by ShowSpinningProgress.
  • DismissLinearProgress: Dismisses the progress dialog displayed by ShowLinearProgress.
  • LogError: logs an error message to the Android log.
  • LogInfo: logs an info message to the Android log.
  • LogWarning: logs a warning message to the Android log.
  • The messages in the dialogs can be formatted using the following HTML tags:<b>, <big>, <blockquote>, <br>, <cite>, <dfn>, <div>, <em>, <small>, <strong>, <sub>, <sup>, <tt>. <u>
  • You can also use the font tag to specify color, for example, <font color="blue">. Some of the available color names are aqua, black, blue, fuchsia, green, grey, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow
Permissions

Events

After Choosing

Event to detect that a user have done his selection.

Params
choice Text

After Message Dialog

Event to detect that a user clicked on a button from the "Show Custom Message Dialog". Use the "title" response to know which dialog the user has clicked.

Params
title Text

After Text Input

Event to detect that a user have done his text input in the "Show Text Dialog".

Params
response Text

Checkbox Selection

Invoked after user has finished selecting items from the Checkbox picker. Returns a list of indices of the selected items in the order of selection. Returns a list having -1 if cancel was pressed.

Params
id Number
selection List

Custom Dialog Selection

Event to detect that the user has pressed a button from the custom dialog. It returns then the text of the button that was pressed.

Params
selection Text

Got Custom Choose Dialog

Event to detect that a user have done his selection in the CustomChooseDialog.

Params
id Number
choice Text

Got Text Input From Dialog

Event to detect that a user have done his text input in the "Show Text Input Dialog".

Params
id Number
response Text

Image Dialog Closed

Event to detect that the user has watched the image dialog.

Params
id Number

Event to detect that a user have closed the Lightbox.

Params
id Number

Linear Progress Dismissed

Event to detect that the linear progress dialog was dismissed.

List Picker Selection

Event to get the picked list selection from the List Picker.

Params
id Number
item Text

Number Picker Selection

Event to detect that the user has selected a number from the number picker dialog.

Params
id Number
selection Number

Radio Selection

Event invoked when user has selected an option from the radio button picker. Outputs the index of the selected item. Returns -1 if cancel was pressed.

Params
id Number
list Index Number

Word Picker Selection

Event to detect that the user has selected a word from the word picker dialog.

Params
id Number
selection Text

Methods

Create Custom Dialog

Show whatever you want in a dialog. You can use as example arrangements, or images or whatever you want. Your chosen layout will be then removed from the screen and only visible in custom dialog. You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color. Please make sure the layout you want to use is visible.

Params
component Component
title Text
button Text Text
cancel Button Text Text
cancelable Boolean

Custom Choose Dialog

Shows a dialog box with two buttons, from which the user can choose. If cancelable is true there will be an additional CANCEL button. Pressing a button will raise the GotCustomChooseDialog event. The "choice" parameter to GotCustomChooseDialog will be the text on the button that was pressed, or "Cancel" if the CANCEL button was pressed. You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color. Use the 'Show Custom Dialog' block to the show the created custom dialog. The added component must be visible on screen. After you used this block here it will be removed automatic from screen and will be only visible again after you have shown the custom dialog.

Params
id Number
message Text
title Text
button1 Text Text
button2 Text Text
cancel Button Text Text
icon Text
cancelable Boolean
fullscreen Boolean

Custom Message Dialog

Show a Message Dialog. You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color.

Params
message Text
title Text
button Text Text
icon Text
fullscreen Boolean

Dismiss Custom Dialog

Use this block to dismiss the created custom dialog.the custom dialog.

Dismiss Linear Progress

Dismiss a previously displayed LinearProgress box

Dismiss Progress Dialog

Dismiss a previously displayed ProgressDialog box

Dismiss Spinning Progress

Dismiss a previously displayed SpinningProgress box

Log Error

Writes an error message to the Android system log. See the Google Android documentation for how to access the log.

Params
message Text

Log Info

Writes an information message to the Android log.

Params
message Text

Log Warning

Writes a warning message to the Android log. See the Google Android documentation for how to access the log.

Params
message Text

Show Alert

Show a alert "toast" message.

Params
notice Text

Show Checkbox List Dialog

Shows a picker dialog with a list of options of whichmore than one can be chosen. Invokes the 'AfterMultiSelection' event. You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color.

Params
id Number
title Text
options List
button Text Text
cancel Button Text Text
cancelable Boolean
icon Text
fullscreen Boolean

Show Choose Dialog

Shows a dialog box with two buttons, from which the user can choose. If cancelable is true there will be an additional CANCEL button. Pressing a button will raise the AfterChoosing event. The "choice" parameter to AfterChoosing will be the text on the button that was pressed, or "Cancel" if the CANCEL button was pressed.

Params
message Text
title Text
button1 Text Text
button2 Text Text
cancelable Boolean

Show Custom Dialog

Show the custom dialog. Dont forget that you have first to create the custom dialog.

Show Image Dialog

Show a image dialog. Animation types like "*.gif" are not supported. You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color.

Params
id Number
title Text
image Text
button Text Text

Show Lightbox

Displays a lightbox. You can use images like ".png" or ",gif" from assets folder or from a web url.

Params
id Number
image Text

Show Linear Progress

Shows a progress dialog with a horizontal progress bar. Can be dismissed by user if 'cancelable' is set to true. If indeterminate is true, maxValue and the 'UpdateProgress' method will have no effect. You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color.

Params
message Text
title Text
cancelable Boolean
indeterminate Boolean
max Value Number
icon Text

Show List Picker

Shows a list picker dialog. You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color.

Params
id Number
title Text
items List List
icon Text
fullscreen Boolean

Show Message Dialog

Show a Message Dialog.

Params
message Text
title Text
button Text Text

Show Number Picker

Shows a number picker dialog that enables the user to select a number from a predefined range. You can use the "Use Background Color" property to use the background color property as background dialog color.

Params
id Number
title Text
button Text Text
cancel Button Text Text
min Value Number
max Value Number
start Value Number

Show Password Dialog

Shows a dialog box where the user can enter password (input is masked), after which the AfterTextInput event will be raised. If cancelable is true there will be an additional CANCEL button. Entering password will raise the AfterTextInput event. The "response" parameter to AfterTextInput will be the entered password, or "Cancel" if CANCEL button was pressed.

Params
message Text
title Text
cancelable Boolean

Show Progress Dialog

Shows a dialog box with an optional title and message (use empty strings if they are not wanted). This dialog box contains a spinning artifact to indicate that the program is working. It cannot be canceled by the user but must be dismissed by the App Inventor Program by using the DismissProgressDialog block.

Params
message Text
title Text

Show Radio List Dialog

Shows a radio list dialog with a list of options of which only one can be chosen. You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color.

Params
id Number
title Text
options List
choose Button Text Text
cancelable Boolean
cancel Button Text Text
selection Number
icon Text
fullscreen Boolean

Show Spinning Progress

Shows a spinning progress dialog which can be dismissed by the user if 'cancelable' is set to true. You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color.

Params
message Text
title Text
cancelable Boolean
icon Text

Show Text Dialog

Shows a dialog box where the user can enter text, after which the AfterTextInput event will be raised. If cancelable is true there will be an additional CANCEL button. Entering text will raise the AfterTextInput event. The "response" parameter to AfterTextInput will be the text that was entered, or "Cancel" if the CANCEL button was pressed.

Params
message Text
title Text
cancelable Boolean

Show Text Input Dialog

Show a text input dialog. Possible input types are: "1= Normal text", "2= Password text", "3= Person name", "4= Email adress", "5|6= Number", "7= Password number" or "8= datetime". You can use the "Light Theme" property to have a light or dark background. Or you enable "Use Background Color" property to use the background color property as background dialog color.

Params
id Number
title Text
default Text Text
icon Text
hint Text
fullscreen Boolean
cancelable Boolean
input Type Number
button Text Text
cancel Button Text Text
text Color Number
hint Color Number

Show Word Picker

Shows a word picker dialog that enables the user to select a number from a predefined word. You can use the "Use Background Color" property to use the background color property as background dialog color.

Params
id Number
title Text
button Text Text
cancel Button Text Text
items List List

Update Progress

Change the current value of the linear progress dialog. Has no effect if "indeterminate" is set to true.

Params
value Number

Properties

Background Color

Color Default: #444444FF  ➖ Read Write - Designer Blocks

Specifies the background color for alerts (not dialogs).

Dim Amount

Available as Advanced Property

Number Default: 0.5 ➖ Read Write - Designer Blocks

Set the amount of dim behind the dialog window. Use '0.0' for no dim and '1.0' for full dim.

Light Theme

Boolean Default: False ➖ Read Write - Designer Blocks

Gets the current theme

Linkify

Boolean Default: False ➖ Read Write - Designer Blocks

If set to true will attempt to make text clickable where possible; e.g. hyperlinks, phone numbers. Can not be used for Progress Dialogs.

Notifier Length

Number Default: 1 ➖ Write - Designer

specifies the length of time that the alert is shown -- either "short" or "long".

Text Color

Color Default: #FFFFFFFF  ➖ Read Write - Designer Blocks

Specifies the text color for alerts or for dialogs message.

Text Font Typeface

Number Default: 0 ➖ Write - Designer

Text Font Typeface Import

Available as Advanced Property

Text ➖ Write - Designer Blocks

Set a custom font.

Title Color

Color Default: #FFFFFFFF  ➖ Read Write - Designer Blocks

Specifies the title text color for dialogs.

Title Font Typeface

Number Default: 0 ➖ Write - Designer

Title Font Typeface Import

Available as Advanced Property

Text ➖ Write - Designer Blocks

Set a custom font.

Use Background Color

Boolean Default: True ➖ Read Write - Designer Blocks

If enabled the dialog will use the color from the "Background Color"-option. Else it will use the theme (light or dark).


Last update: January 27, 2020