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

Native Development

Reply
Developer
Posts: 83
Registered: ‎06-20-2013
My Device: Blackberry 10
My Carrier: idea
Accepted Solution

Notifications

how to add notifications in my app using cpp code....i want to add the notification code in a member function of my app.cpp file.....i tried it using  

 

Notification* pNotification = new Notification();
 
pNotification->setTitle("My Notification");
pNotification->setBody("This is important information.");
pNotification->notify();

 

but still not working Smiley Sad

 

Plz help

Developer
Posts: 19
Registered: ‎07-02-2013
My Device: BlackBerry Q10
My Carrier: Telus

Re: Notifications

Do you have the Post Notification permission set in your bar descriptor?
Developer
Posts: 24
Registered: ‎10-31-2012
My Device: Dev Alpha B
My Carrier: COMPE

Re: Notifications

"Notifications are included in the bb:Smiley Tonguelatform library. To use these classes in your app, you must add the following line to the .pro file in your project:
LIBS += -lbbplatform

Your app must also have the post_notification permission, which you specify in the bar-descriptor.xml file for your app. To learn more about the bar-descriptor.xml file, see Using the bar-descriptor.xml file."

https://developer.blackberry.com/cascades/documentation/device_comm/notifications/
__
Helped you? Like me.
Developer
Posts: 83
Registered: ‎06-20-2013
My Device: Blackberry 10
My Carrier: idea

Re: Notifications

thanks for the replies.....i got my mistake....the declaration of notification in header file wasn't correct.....

Changed it to bb:Smiley Tonguelatform::Notification *notification.

 


Now the code works fine.....Smiley Happy

 

Thanks

New Member
Posts: 1
Registered: ‎03-29-2014
My Device: bold
My Carrier: 02

Re: Notifications

Hi dose anyone no were u can see the notification for when someone has read there text messege??