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
New Contributor
pzill4
Posts: 4
Registered: ‎07-20-2013
My Device: Z10
My Carrier: Rogers

Having Trouble Sending Push Data to Hub

[ Edited ]

I'm working on a webworks app and consuming push messages from BES10.

 

I think I have it all hooked correctly.  When a push is received and app is in the foreground I output the data to the web UI.  When the app is closed and a push is received, it's launched and the data is outputted to the UI

 

I'm uncertain how I add an item to the "Notification"  list in the Hub.  The documentation says to use the Notification object.  

 

Can anyone provide me with some examples?

Please use plain text.
New Contributor
pzill4
Posts: 4
Registered: ‎07-20-2013
My Device: Z10
My Carrier: Rogers

Re: Having Trouble Sending Push Data to Hub

[ Edited ]

Config.xml setting

 

had

rim : permission post_notifications as outlined here:

https://developer.blackberry.com/html5/documentation/rim_permit_element.html

 

then went to here and found this:

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

 

RIM documentation needs updating?

Please use plain text.
Developer
pyth
Posts: 463
Registered: ‎01-19-2011
My Device: My Trusty Red Plane
My Carrier: Outer Space

Re: Having Trouble Sending Push Data to Hub

[ Edited ]

did you try the code example in your second link? under 'Constructors'

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

 

also, I might be wrong, but your first link says, the permission is

post_notifications

while your second link gives you

 

Permission Elements (PlayBook and BlackBerry 10+)
You must declare the permission element(s) below in your configuration document:
- <rim:permit>post_notification</rim:permit>
Permits your application to create notifications. 

 (note the missing 's')

 

 

Edit: Oh, and yes, RIM documentation is so old/bad/deprecated, everyone actually goes here to the forums to get working code samples :smileywink:

 

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Please use plain text.