Notifications

The Notifications API allows you to create a notification in the BlackBerry Hub.

Only notes about the BlackBerry WebWorks implementation of the standard HTML5 Notifications API are provided here. For a complete description, see Web Notifications on the w3 website.

Installation:

This object is part of standard HTML5. No special installation is required.

Permission Elements:

To use this API, you must declare the permission element below in your www/config.xml file.

<rim:permissions>
    <rim:permit>post_notification</rim:permit> 
</rim:permissions>
Functions:
void requestPermission()
Properties:
String permission

requestPermission()

The w3c requestPermission function. For a BlackBerry WebWorks app, permission is always granted, so this function has no effect.

Synopsis:

static void Notification.requestPermission([callbackFunction])

permission

The w3c static permission attribute returns permission to show a notification for a given origin. For a BlackBerry WebWorks app, permission is always granted, so the value returned is always "granted".

Synopsis:

static String permission

Last modified: 2014-10-09



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus