If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Reply
Developer
ChernyshovYuriy
Posts: 116
Registered: ‎11-18-2010
My Device: BlackBerry PlayBook
My Carrier: null

Blackberry 10 PUSH service

[ Edited ]

Hello dear development adisor.
As you recomended I create a new thread regarding PUSH service on Blackberry 10.

What we have:
- we have an android app that works fine with PUSH;

- we convert it using blackbery command line tools into bar file;

- inside bar file we add at "android" folder a configuration file android.cfg, as we have also our application blackberry version we also have official blackberry credentials to work with PUSH service and we try to use them, as they are legal and official, our configuration file:

<?xml version="1.0" encoding="utf-8"?>
<android>
    <push>
          <appid><our_app_id></appid>
          <ppgurl>http://pushapi.na.blackberry.com</ppgurl>
          <tokenprefix></tokenprefix>
     </push>
</android>

 - we add at the MANIFEST.MF file appropriative permission:

Entry-Point-System-Actions: _sys_use_consumer_push

- we sign bar file using command line tools and received from the blackberry sign keys;

- we appload application at the device and get next results:

   - application successfully registered at PUSH server;

   - when application exit other users can see it as online, this means that we are in push;

   - when some one send us a message, from a blackberry push server we get an answer "The request has been accepted for processing"

   - the message never deliver to application.

 

Another unsuccessfull example, this time we try to use Blackberry 10 SDK for Adobe AIR. We use Native SDK tool to monitor device logs:

   in the IDE, in the Target Navigator view, right-click the device target -> click Launch SSH Session -> in the terminal that appears type "slog2info -w".

What we does:

- we use official example;

- we use same blackberry push enabled credentials we specified above (app_id and ppg_url);

- when connect via Wi-Fi and launch app at Blackberry 10 device it does next:

   - app registering successfully:

 

msg::createChannel
id::createChannel_1464438156
dat:json:{"providerApplicationId":"<our_app_id>","targetKey":"sample.pushreceiver.invoke.push","dName":"Blackberry10.AIR.PushApp.debug.testDev_shApp_debugd926e770","perimeter":1,"ppgUrl":"http://pushapi.na.blackberry.com"}
msg::onCreateChannelComplete
id::createChannel_1464438156
dat:json:{"token":"<received_token>"}

    - we initiate at our web side a message but app never receive it;

- when connect via BIS and launch app at Blackberry 10 device it does next error "Create channel failed as the push transport is unavailable. Verify your mobile network and/or Wi-Fi are turned on. If they are on, you will be notified when the push transport is available again."

 

Please help us to find out a point of problem and solve the issue.

Best regards.

Yuriy.

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry 10 PUSH service

Hi Yuriy,

 

Did you add 'bb' in the tokenPrefix element?

Do you have any other apps on the device that are using this same push account? Note that if you try to use the same account in 2 applications simultaneously you will run into issues when trying to register.

Are you testing using a production or evaluation account?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
ChernyshovYuriy
Posts: 116
Registered: ‎11-18-2010
My Device: BlackBerry PlayBook
My Carrier: null

Re: Blackberry 10 PUSH service

Hi Garett.
About "bb" prefix - we don't use it as we use obtained earlier Blackberry credentials, they are official and we use them on our application at blackberry platform long time. If we add this prefix - push server don't allow to register application.
About second question - no, we use only one application at device with unique credentials, just because we have a few pairs of credentials, we apply them into Android and AIR applications.
We use production account.
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry 10 PUSH service

The token prefix has nothing to do with the credentials, it is used so that you can differentiate a BlackBerry device. Could you clarify what happens when you try to specify it?

 

For the AIR application, could you try deleteing then resetting the device and try again?  The device registration may have gotten into an odd state.

Also, what OS build are you using?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
ChernyshovYuriy
Posts: 116
Registered: ‎11-18-2010
My Device: BlackBerry PlayBook
My Carrier: null

Re: Blackberry 10 PUSH service

Ok, let's try to makes things clear. Speaking about Android application, we have our server to communicate with our application. It is clear that we know what device send us registration credentials. We are use them to register at blackberry push server and we does it successfully. Application go to push mode, when our server received a message for this application we already know a state of the application (in push) and we already know a push token for this application (as we got it from blackberry push server when registered), the problem is:
- we send to the blackberry push server a message with all necessary data to deliver it in push mode, we have got a message from blackberry server "The request has been accepted for processing" and that's it, application that is in push mode never receive it. This is a problem.
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry 10 PUSH service

Thanks for the clarification.

 

If you close the application then send the push, does the application eventually launch in a minimized state? (trying to determine if the Push arrives to the device but not the app)

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
ChernyshovYuriy
Posts: 116
Registered: ‎11-18-2010
My Device: BlackBerry PlayBook
My Carrier: null

Re: Blackberry 10 PUSH service

This is a point ... we use Native SDK tool to monitor device logs (as I specify in my first post) and see that there is no messages arrives at devices at all. And as result - application does not launch.
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry 10 PUSH service

No need to monitor at this point, and from the above you only stated that the Native SDK was used for the AIR app which failed to create the channel. For clariity, can you confirm that you have tested the same for Android?

 

If so please run a subscription query on the device PIN being used and let me know the response from the BlackBerry Push Server.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
ChernyshovYuriy
Posts: 116
Registered: ‎11-18-2010
My Device: BlackBerry PlayBook
My Carrier: null

Re: Blackberry 10 PUSH service

Ok, we did a security wipe of the Blackberry 10 Dev Alpha divice and now we are completle confused. There is no possible to register with BBM! Always get a message: "No BlackBerry Data. BBM is unable to connect to server." Also in case of running Android app - there is no response nor success neigher error from blackberry server when send request to register with push credentials. When launching AIR app, always get a message:"Create channel failed as the push transport is unavailable. Verify your mobile network and/or Wi-Fi are turned on. If they are on, you will be notified when the push transport is available again."
So, we confused now with an issue of wiped divice. I think this is something known? How to restore a functionality of the divice?
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry 10 PUSH service

Please run the autoloader from here to restore your device:

https://developer.blackberry.com/devzone/blackberry10devalpha/devalpha_update.html

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.