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
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

How does Susbcription to Blackberry Push services work

Hi,

I am trying to create a push enabled application for Blackberry.
The sample app provided in the push sdk worked fine for me.
I integrated the server code with my code and it worked properly.

Just had a doubt regarding the subscription process from client to server.
Does the server, register the device with the Blackberry PPG or with himself only?

I wrote an application in which the port specified by blackberry was kept always open. I am not able to receive the notifications on it.

Please help.
Thanks in advance.
Regards,
Annuk

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: How does Susbcription to Blackberry Push services work

Hi Annuk,

 

The device will need to register both against the PPG as well as against your server (Push Initiator).

 

You could have your Push Initiator query the PPG for a list of subscribed user PINs, this is recommended to perform routinely anyways, but ideally your device would send a registration request right to the push initiator so it can start receving pushes right away.

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

Re: How does Susbcription to Blackberry Push services work

Hi,

 

Thanks for your reply.

You mean to say that subscribing to PPG and push initiator are two different process.

These processes would be done by the client device only. The device would be simultaneously subscribing to the PPG as well as the push initiator.

 

The Push initiator would not interact with the PPG for subscribing the device, it would intearct only for sending messages and for querying the subscribed pins.

 

Please help.

I am a bit confused here.

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: How does Susbcription to Blackberry Push services work

Yes, your last post has the correct understanding.

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

Re: How does Susbcription to Blackberry Push services work

Hi Garett,

 

Thanks for your reply.

I am developing a bb app using html5.

I had gone through the sample app code provided by blackberry, but it does not give the details of the  bpasProtocol.register( tx, isEnterprise );method in detail.

 

It uses PushApplicationRegistry.registerApplication( pad ); to register.

 

Is anybody having any samples for registering the device to the PPG using javacscript?

 

Thanks.

 

Regards,

 

Annuk

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: How does Susbcription to Blackberry Push services work

Hi Annuk,

 

A few questions which will help determine what is needed in your app:

1) Are you targeting BlackBerry OS <=7.1 or BlackBerry 10?

2) Are you trying to push in an enterprise environment, through a BES? Or to consumers through BIS?

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

Re: How does Susbcription to Blackberry Push services work

Hi,

 

1) Are you targeting BlackBerry OS <=7.1 or BlackBerry 10?

we want to target devices after 5.

 

2) Are you trying to push in an enterprise environment, through a BES? Or to consumers through BIS?

We would be pushing to the consumers through BIS.

 

Thanks.

Regards,

Annuk

 

 

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: How does Susbcription to Blackberry Push services work

In that case, here are the appropriate API documents and a sample which shows how you can register:

https://developer.blackberry.com/html5/apis/blackberry.push.html#.openBISPushListener

 

Note that this will register your app with the PPG but you will need to add your own call to register with your server-side application if needed.

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

Re: How does Susbcription to Blackberry Push services work

yes, we would have our own implementation for registering with the push initiator.

Thanks for your reply.

 

Regards,

Annuk

Highlighted
Retired
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: How does Susbcription to Blackberry Push services work

If you are developing an app in HTML5 refer to the WebWorks push APIs:

https://developer.blackberry.com/html5/apis/blackberry.push.html