HTML5 / Webworks

HTML5 / Webworks 2.0 Integration Guide

Download Script
Download Sample

Here are a few simple steps to integrate Pushwoosh plugin into your BlackBerry 10 Webworks 2.0 application:

1. Add the following list of plugins into your project:

2. Add the access url into your config.xml:

<access uri="" subdomains="true" />

3. Add the following script to config.xml:

<rim:invoke-target id="GENERATE.invoke.push">
<rim:invoke-target id="">   // GENERATE is the unique identification value of your application 

In the code above replace “GENERATE” with a unique identification value of the app.

4. Add the following permissions:

    <rim:permit system="true">_sys_use_consumer_push</rim:permit>

5. Add the following libraries to your project:

Download our plugin (pushwoosh.js) here and place it in “js” subfolder (ex: “js/pushwoosh.js”).

Download jQuery library and place it in “js” subfolder (ex: “js/jquery-1.10.2.min.js”).

6. Add the following script to the index.html:

<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/pushwoosh.js"></script>
<script type="text/javascript">
    document.addEventListener('deviceready', function ondeviceready() {                 
            //This is a push handler function! Let's show alert with push content!
            alert("push: " + JSON.stringify(pushObject));
    }, false);


  • We recommend adding this script inside the body tag in the very end;
  • You can use different jQuery libraries, download them here;
  • Don't bother looking for cordova.js – the web worker builder will do everything.

7. Change the following application settings in pushwoosh.js with settings you receive from BlackBerry:

var config = {
    ops : {
        invokeTargetId : "GENERATE.invoke.push", // use the same id value as in config.xml
        appId : "XXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", // AppId from the Blackberry configuration email 
        ppgUrl : "" // ppgUrl from the BlackBerry configuration email 
    pushwooshAppId : "XXXXX-XXXXX", // Pushwoosh Application Code
    invokeTargetIdOpen : "" // use the same id value as in config.xml

Make sure PGG Url is HTTP.

HTTPS push notifications channel won’t be able to subscribe.

HTML5 / Webworks

HTML5 / Webworks 2.0 Integration Guide