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
ElGriego
Posts: 22
Registered: ‎03-27-2013
My Device: 9520
Accepted Solution

Push notifications

[ Edited ]

When we have a push - enabled application , and we need to send a push to if from our server , do we need both the token and the device id ?  Cause on the sample server (low-level-sample) , it seems that it asks for a push id (what is that?!) and an address (device id) .  Am i getting something wrong here , or i really need both to make it work?

 

Also where exactly is the token?! I dont see it anywhere.. The only thing i see from the sample server is that i need the device id and BOOM , i have a new message on the device. What is the push id? It seems that it can be anything i like. But where is the token? We dont have a token in BB development?

 

Thank you very much.

Retired
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10

Re: Push notifications

The "token" terminology is used mostly in BlackBerry 10 to refer to this address identifier.

It currently matches the PIN of the device, just like BlackBerry OS.

This is the piece of information you need to be able to push to a BlackBerry.

 

Push ID is the unique identifier you give the push when you send it out.

Yes, the push ID can be an identifier of your choosing - but you need to take steps to ensure its uniqueness to your application.

 

Thanks,

 

Matt

Contributor
ElGriego
Posts: 22
Registered: ‎03-27-2013
My Device: 9520

Re: Push notifications

Why do i need to have a push id ? Whats the purpose of it ? I ve seen php scripts that dont use something like that.

Retired
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10

Re: Push notifications

It uniquely identifies the push and is required in all PAP XML that is sent to the BlackBerry Push Service.

Contributor
ElGriego
Posts: 22
Registered: ‎03-27-2013
My Device: 9520

Re: Push notifications

So i must make my server every time that sends a push to generate a unique push id?

And never ever be the same , even after months?

Retired
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10

Re: Push notifications

Correct.  In our Push Service SDK, we use a domain name + "-" + <5 random characters> + "-" + <the current time in milliseconds> in our push ID generation.

Note that your push ID cannot exceed 40 characters.

Contributor
ElGriego
Posts: 22
Registered: ‎03-27-2013
My Device: 9520

Re: Push notifications

Great!

Thank you very very much for the detailed explanation.