Puship.PushipAppId = puship_id; // un esempio di puship_id potrebbe essere: "h1mCVGaP9dtGnwG"
var serverUrl = "http://cpXXX.pushapi.eval.blackberry.com"; // l'url di produzione o sviluppo fornito da blackberry
var appId = "396-577a13e9r57070Mnn75549ii0ch2r9l41808"; // questo appid è fornito da blackberry assieme all'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));
}
});
Puoi ora connetterti al Puship Manager e inviare notifiche push ai tuoi device!
Per qualunque problema con la configurazione puoi scaricare l’esempio qui sotto
Per poter invece aggiungere tags, gestire la geolocalizzazione e tutto ciò che riguarda il resto delle api puship visita la documentazione comune per tutte le piattaforme:
Documentazione sulla libreria Common