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
Contributor
fluidfake
Posts: 16
Registered: ‎02-02-2011
My Device: Not Specified
Accepted Solution

is Push Subscribe really needed?

Hi,

 

When you are implementing the push initiator do you need to provide a service for the client to subscribe?

 

With push I am not looking to send out individual messages to each user.  I am hoping to send out global messages to all users of my app.

 

Thanks

 

 

 

Please use plain text.
BlackBerry Development Advisor (Retired)
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: is Push Subscribe really needed?

It is possible to send a broadcast message to all your users but we strongly recommend that you provide a service for clients to subscribe with your server side application and send push requests addressed specifically to devices.

 

By performing subscription from the device to your server you will:

 

- Know exactly who and how many devices are subscribed to your application

 

- You can perform maintenance on the list of subscribed devices. It is expected you will not unknowingly push to devices that are no longer subscribed to your app either because the app was deleted, or the device is no longer in coverage, no longer has a data plan, etc... In order to do this the BlackBerry Push Service exposes a subscriber query API that you should call periodically to reconcile the subscriptions in your server-side application with the state of those subscriptions within the BlackBerry Push Service @see Subscription Query API 

 

- By keeping subscriptions you can and should give your the users of your app the ability to permanently or temporarily opt-out of receiving pushes from your application at their choice by offering an unsubscribe or suspend functionality

 

- If the device changes owners the new owner may not want to receive pushes for your app. We recommend you refer to your subscribers by a “subscriber id” instead of directly by PIN. Keep a mapping of subscriber id to PIN under the covers in your server-side application. This is one way to help detect subscriber swap and device swap scenarios as you will be able to check if a different subscriber id is subscribing to an already subscribed device PIN.

 

The Push Service SDK has all of this functionality built in for you already.

 

Please use plain text.
Regular Contributor
annuk
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

Re: is Push Subscribe really needed?

Hi,

 

Just had a doubt.

When we say subscribe to the server, the client is actually susbcribing to my push initiator or server.

The client does not directly interacts with the Blackberry Push servers?

 

"With a<subscriptionquery-message>request, you can explicitly poll the BlackBerry Push Service database to identify which BlackBerry devices are no longer subscribed."

 

How does blackberry server know that the user is no longer susbcribed?

 

Can you shed some light on the subscription process? I am trying to develop a push enabled app using html5.

 

The code works only on one device BB9800. But not on other devices.

 

Please help.

 

Regards,

Annuk

Please use plain text.
BlackBerry Development Advisor (Retired)
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: is Push Subscribe really needed?

You should subscribe to both. Subscription with BlackBerry Push Service is mandatory for push to be recived to your deivce. Subscription with your own server-side application is optional but strong recommended. See my response above for reasons why you want to keep subscriptions in your server-side application.

 

If you use the push APIs availabe in JDE 5.0 and above it will take care of the subscription with BlackBerry Push Service for you.

Please use plain text.
Regular Contributor
annuk
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

Re: is Push Subscribe really needed?

Hi,

 

Thanks for your reply.

So i should register to this

PPG Base URL** https://pushapi.eval.blackberry.com

 

or

 

PPG Base URL**

http://cpXXX.pushapi.eval.blackberry.com

 

 

Please use plain text.
Regular Contributor
IpiRon
Posts: 75
Registered: ‎10-19-2011
My Device: Developer
My Carrier: verizon

Re: is Push Subscribe really needed?

I also am writing a custom push initiator (in VB). I found that I could register to both of the above. Does anybody know which is the preferred URL?

Please use plain text.
BlackBerry Development Advisor (Retired)
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: is Push Subscribe really needed?

[ Edited ]

@annuk - http://cpXXX.pushapi.eval.blackberry.com is the URL to subscribe with.

Please use plain text.
Regular Contributor
annuk
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

Re: is Push Subscribe really needed?

[ Edited ]

Thanks.We would require to replace XXX with the content id?

 

Regards,

Annuk

Please use plain text.
BlackBerry Development Advisor (Retired)
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: is Push Subscribe really needed?

Yes. Refer to the email you received once you signed up to use push for the value.
Please use plain text.