08-21-2012 09:33 AM
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.
Solved! Go to Solution.
08-21-2012 10:18 AM
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.
10-18-2012 03:26 AM
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.
10-18-2012 11:37 AM
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.