Toast
The Toast object contains functions for displaying toast notifications.
The functionality of this object allows the developer to display system toast notifications within their WebWorks application.Supported Platform(s)
| - BlackBerry 10 |
| API | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
|---|---|---|---|---|---|---|---|
| blackberry.ui.toast.show | Y |
Configuration Document Settings
|
To use all of the API described for this object, you must ensure the following settings are in your configuration document: |
|
You must declare the feature element(s) below in your configuration document: |
| Feature ID | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
|---|---|---|---|---|---|---|---|
| <feature id="blackberry.ui.toast" /> | Y |
| Permission Elements (PlayBook and BlackBerry 10+) |
|---|
| This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Functions
| Number | blackberry.ui.toast.show |
Functions
static
Number
blackberry.ui.toast.show
(message : String, [options : Object])
Displays a toast notification.
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
| Parameters | |
|---|---|
| message | Message to be displayed in the toast. |
| options |
An optional options object that specifies the buttonText, and callback handlers that should be used by the toast
buttonText: Optional parameter that specifies the label for the button within the toast. buttonCallback: Optional callback for receiving the button event when the user selects the toast button. dismissCallback: Optional callback for receiving an event when the toast dismisses either through the toast's timeout or when the button is selected. |
Return:
A numeric ID to reference this toast by.
Code Example:
|
Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 18:15:45 GMT-0500 (EST)