BlackBerry

  1. Add the PushipNotification.js script to the assets/www folder and include it to the index.html file
  2. Add the following code to the OnDeviceReady method:
      Puship.PushipAppId = puship_id; // an example of puship_id might be: "h1mCVGaP9dtGnwG"
      var serverUrl = "http://cpXXX.pushapi.eval.blackberry.com"; // the url of production or development provided by blackberry
      var appId = "396-577a13e9r57070Mnn75549ii0ch2r9l41808"; // this appid is provided by blackberry with the url
      var port = 32200;
      
      Puship.BPNS.Register(port, serverUrl, appId,
      {
      	successCallback: function (pushipresult){
      		navigator.notification.alert("device registered with DeviceId:" + pushipresult.DeviceId);
      	},
      	failCallback: function (pushipresult){
      		navigator.notification.alert("error during registration: "+ JSON.stringify(pushipresult));
      	}
      });
      
  3. Add these permission to config.xml:
        
        
      
  4. Create a new folder in the www one and name it resources. Once done it copy into it this icon (note that can be overwritten with a custom one).
  5. In case you didn’t have the serverUrl and the appId, follow this guide and replace the example values in the previous script.
  6. Create a new application using the Puship Manager to get the Puship App ID and replace all the occurrences of “puship_id” with the actual one.

It’s now possible to connect to the Puship Manager and start sending push notification to your devices!

Download a complete example using the link below to better understand the whole process

 

 

Adding tags, geolocations management and all the other api are described in the guide common to all the platform that can be consulted at the following link: