AppController.showBanner

From WebOS101

Jump to: navigation, search

Introduction

Show the message text from the bannerParams in the banner area. The launchArguments will be used to launch or relaunch the application if the banner is touched. The category parameter defaults to 'banner'. New banners of each category will replace existing banners of the same category. For a more generic overview of banner notifications, see Notifications.

Parameters

{String|object} bannerParams bannerParams Can be either a string, in which case it is simply message text, or an object with the following properties:

messageText text to display

soundClass string containing the sound class to use

soundFile partial or full path to a sound file to play

icon partial or full path to an icon to show

soundDuration duration of sound in milliseconds

{String} launchArguments Arguments sent to the application when it is launched or relaunched if the banner is touched. {String} category Value defined by the application. It is used if you have more than one kind of banner message. Without categories, any banner shown would replace an existing banner that had not yet been shown.

Example Usage

Mojo.Controller.getAppController().showBanner("Woohoo!  A banner!",
{source: 'notification'});
Personal tools