Blackberry not receiving push notifications

时间:2015-07-31 20:38:30

标签: cordova blackberry-10 phonegap-pushplugin blackberry-push

I am trying to receive push notifications to our blackberry devices running software version 10.2.x

I am able to post to the blackberry push eval service and receive the status code code="1001" desc="The request has been accepted for processing." but messages are never received on the device.

The app is using cordova phonegap.

I have registered the invoke target in our config.xml:

<rim:invoke-target id="com.ourid.invoke.push">
        <type>APPLICATION</type>
        <filter>
            <action>bb.action.PUSH</action>
            <mime-type>application/vnd.push</mime-type>
        </filter>
    </rim:invoke-target>
    <rim:invoke-target id="com.ourid.invoke.open">
        <type>APPLICATION</type>
        <filter>
            <action>bb.action.OPEN</action>
            <mime-type>text/plain</mime-type>
        </filter>
    </rim:invoke-target>

Registered the push in our app:

function successHandlerBB(result) {
    //never calls the successhandler
       ...
}
// BlackBerry10
function onNotificationBB(pushpayload) {
             //never gets here
             ...
}

pushInstance = window.plugins.pushNotification;
addCallback('notificationHandler', onNotificationBB);
pushInstance.register(
    successHandlerBB,
    errorHandler,
    {
        invokeTargetId : "com.ourid.invoke.push",
        appId: ".......", 
                ppgUrl:"http://cpxxxx.pushapi.eval.blackberry.com",
        ecb: onNotificationBB,
        simChangeCallback: simChangeCallback,
        pushTransportReadyCallback: onPushTransportReady,
        launchApplicationOnPush: true
        }
);

It never seems to call the success handler function or the error handler function.

Anyone have any suggestions? Let me know if you need any clarification on anything.

Thanks!

0 个答案:

没有答案