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

Posts: 132
Registered: ‎11-06-2012
My Device: BlackBerry Passport
Accepted Solution

Need help about Notification Dialog

I'm currrently have some trouble with the notification dialog:- I can't figure out how to connect the signal of SystemUiButton - are appended to notification dialog in Qt code, I have two button on the dialog.

- Is there a way to disable the sound and led notification when the dialog show?


Thanks foe helping

Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10
My Carrier: Rogers

Re: Need help about Notification Dialog

[ Edited ]

Are you only using QML?  Did you check the Sample App for Notifications in the Platform list here?



If you're using QML:

You'd use onFinished: { } for the NotificationDialog that you specify in the attachedObjects area to get the signal...


    onFinished: {
if (result == 2)
console.log("SUI: " + notificationDialog.buttonSelection().label)

 To see which button was selected according to the label you provided...


If you're using C++:

Connect the signal with a member variable you declare for the NotificationDialog and:

// Be sure to include the SystemUiButton and NotificationResult stuff
#include <bb/system/SystemUiButton>
#include <bb/platform/NotificationResult>

    bool res = connect(myNotDialog,

// In your SLOT function you would check the result...

void myClass::onFinished(bb::platform::NotificationResult::Type result)
    if (result == NotificationResult::ButtonSelection) {
        if (myNotDialog->buttonSelection()->label() == "Okay") {
            // User clicked Okay
            // And you check any other button labels you have..
} } }


Not 100% sure, but that is the idea...



Used the wrong include areas...


Also, I'm not entirely sure you can disable the notification stuff within your app. I know the user can within Settings -> Notifications ... but obviously that doesn't help you much.. .. You can try to use the resetCategory() function which sets it to a QString::null, which means no category.. Not entirely sure if that is how it's done..


And perhaps using setSoundUrl(""); but not sure if it would give an error...

Posts: 132
Registered: ‎11-06-2012
My Device: BlackBerry Passport

Re: Need help about Notification Dialog

setSoundUrl("") is not working. But it's no problem now.

Thank you so much for your help.

Regular Contributor
Posts: 84
Registered: ‎12-02-2009
My Device: Not Specified

Re: Need help about Notification Dialog

do you find the solution