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
marcossit
Posts: 176
Registered: ‎07-19-2012
My Device: Z10 Limited Edition and Dev Alpha C

Notifications Preview in Homescreen

[ Edited ]

I want to show the level of the battery, temperature and other options, but does not show me anything use the following.

 

   myNotification = new Notification();
   myNotification->setTitle("DeviceSuite App Notifications");
   myNotification->setBody(hwInfo.modelName() + batteryInfo.level() + batteryInfo.temperature());
   myNotification->setIconUrl(QUrl("asset:///img/icoApp.png"));
   myNotification->button()->setLabel("Open");

 The only thing I function and is shown in the preview is: 

hwInfo.modelName()

 But Battery not  :smileysad:

 

MOD EDIT: Subject changed to reflect a new topic


Follow me in Twitter:

@Marcossit

BBM Channel:

MarcossitDev: C0002C366  

DeviceSuite For BlackBerry 10:

Link to Download DeviceSuite:

Support was successful? Accept as Solution and click on:


Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Notifications Preview in Homescreen

i would suggest that you construct the body as a string beforehand and add logging to output it to the console.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter