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
farhanh
Posts: 31
Registered: ‎05-18-2010
My Device: 9550
Accepted Solution

Adding Custom Headers in Blackberry Push Message (OS 6-7)

Hi,

Kinldy tell me that how can i add the Custom Headers in Blackberry Push Message besides "text/plain", Blackberry Push Messages are working perfectly but i have to add the custom headers to get some content info.

I have tried by adding headers in Content class at Push Initiator end but unable to receive in Connection object at client side in Parse(PushInputStream pis, Connection conn), So please let me know that how to do it.

Thanks 

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

Re: Adding Custom Headers in Blackberry Push Message (OS 6-7)

What exactly are you trying to send for the push payload?

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
farhanh
Posts: 31
Registered: ‎05-18-2010
My Device: 9550

Re: Adding Custom Headers in Blackberry Push Message (OS 6-7)

"Message Type"

I have tried it through getContent.addheaders() but not able to receive at the destination end, So is there a proper way to add headers?

Thanks

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

Re: Adding Custom Headers in Blackberry Push Message (OS 6-7)

What is the end goal? Why are you trying to add custom headers?

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
farhanh
Posts: 31
Registered: ‎05-18-2010
My Device: 9550

Re: Adding Custom Headers in Blackberry Push Message (OS 6-7)

In-fact i am working on IM Applicaiton, therefore i have to perform different actions on different types of messages, just as "Push-Message-ID" has received in Connection object header, i want to add message ID's also in headers so that i can get the message iD's same as i get "Push-Message-ID".

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

Re: Adding Custom Headers in Blackberry Push Message (OS 6-7)

Add any data you need the client to receive to the payload in a mnner that can be parsed. Only the data in the payload section of the push message will be delivered to the client app (apart from the push message ID).

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
farhanh
Posts: 31
Registered: ‎05-18-2010
My Device: 9550

Re: Adding Custom Headers in Blackberry Push Message (OS 6-7)

therefore i am receving Data at client end by getting type "text" and then parse the Push Input Stream, and from server end i am sending the message with message ID's which are '||' seperated such as:
messageID=101||message=This is a text message
This works fine for me but i just want to send message ID through differnet place, so that i can able to parse at client end.

Thanks 

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

Re: Adding Custom Headers in Blackberry Push Message (OS 6-7)

The payload is the only place you have control to set data, the rest is all based on standards and cannot be customized.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
farhanh
Posts: 31
Registered: ‎05-18-2010
My Device: 9550

Re: Adding Custom Headers in Blackberry Push Message (OS 6-7)

Ok thanks a lot for your time