HELP the QML Notification problems

I don't know why my custom sounds and the icon does not work. I checked my sounds and icons are really in the right place and they are valid.

//imported this import bb.platform 1.2 // I am running it to my device with 10.2 OS//I've also added the permissions and the proper library in the pro file

Notification
        {
            id: theNotification
            soundUrl: "asset:///sounds/ios.wav"
            iconUrl: "asset:///images/icon.png"
            title: "Test"
            body: "Test"
        }

then I call this in a button theNotification.notify();

Also how can I continue to add notifications? When he has already added a notification in the hub, you may not add another new and nothing happens.

Also is there a way to disable its default Notifications?

I hope that a solution to this little problem.

Hi, I tried your 2nd suggestion and did not work at all. no error and no notificaitons have been issued.

I just used C++ and works perfectly. Thank you very much!

I just built a function

void ApplicationUI::notify(QString title, QString body)
{
    Notification* notification = new Notification();
    notification->setTitle(title);
    notification->setBody(body);
    notification->notify();
}

So call whenever I need to display a Notification of Hub.

Tags: BlackBerry Developers

Similar Questions

  • The Microsoft Security Alert shield is red in the section of the taskbar notifications. Help, please!

    The Microsoft Security Alert shield is red in the section of the taskbar notifications. I opened it and it says virus protection is turned off and "Microsoft Security Essentials reports that it is turned off. Checked with Microsoft Security Essentials and it says computer is protected. What should I do? Thanks for help!

    The Microsoft Security Alert shield is red in the section of the taskbar notifications. I opened it and it says virus protection is turned off and "Microsoft Security Essentials reports that it is turned off. Checked with Microsoft Security Essentials and it says computer is protected. What should I do? Thanks for help!

    I'm guessing that you're referring to a problem involving the Security Center that happens sometimes after update silent through updates of Windows to the new version of MSE... but it is also sometimes occurring after the updates of Windows 'monthly '.  Usually, but not always the problem occurs on computers running XP.

    If the MSE icon is green then you should be protected and cannot ignore this Security Center warning. The problem resolves after a few days.   I do not pretend you disable the protection in real time on MSE, disable Security Center, restart the computer and then turn everything back on and restart once more... some users report this sequence fixed the problem.

    BUT

    You may want to consider the following threads:

    http://answers.Microsoft.com/en-us/protect/Forum/MSE-protect_start/Ive-Windows-essential-and-is-showing-me-my-PC/c76fc125-c21f-46a9-8B9F-c9b1311171b1

    http://answers.Microsoft.com/en-us/protect/Forum/MSE-protect_updating/Security-Center-message/558e1220-9f21-4e6c-Be92-ddcc65d36c0c

  • HELP the multiple ContactPicker in QML

    I have this code

    ActionItem
                {
                    title: "Invite Contacts"
                    ActionBar.placement: ActionBarPlacement.OnBar
                    imageSource: "asset:///images/titleAddFriend.png"
                    onTriggered:
                    {
                        contactPicker.open();
                    }
    
                    attachedObjects: ContactPicker
                    {
                        id: contactPicker
                        mode: ContactSelectionMode.Multiple
                        onContactsSelected:
                        {
                            for(var i = 0; i < selectedContactsIds.length; i++)
                            {
                                var phoneNumber = _app.getContactPhoneNumber(selectedContactsIds[i]);
                                console.log("PHONE: " + phoneNumber);
                            }
                        }
                    }
                }
    

    but does simply not multiple selector. It still operates as the single contact selector by default. I added a qml register type in main.cpp and libraries are also imported. any suggestions please? This problem is also present although 10.1 and OS 10.2.1 tried.

    I thought about it... its another case of QML it can not handle.  After testing your code, I noticed this error

    file:///apps/com.example.dynamicattach.testDev_namicattach58cf113_/native/assets//main.qml:51: ReferenceError: Can't find variable: ContactSelectionMode
    

    So I tried to import ContactSelectionMode qml as the selector is with no success.

    So, I stuck with c ++ for the switch and got the results of work

    The solution

    applicationUI.cpp

    #include 
    #include 
    
    void ApplicationUI::contacts()
    {
          ContactPicker *contactPicker = new ContactPicker();
          contactPicker->setMode(ContactSelectionMode::Multiple);
          contactPicker->setKindFilters(QSet()
               << bb::pim::contacts::AttributeKind::Phone);
    
          bool success = QObject::connect(contactPicker,
                 SIGNAL(contactsSelected(QList)),
                 this,
                 SLOT(onContactsSelected(QList)));
    
          if (success) { // Signal was successfully connected.
                contactPicker->open();
              } else { // Failed to connect to signal.
                qDebug() << "Didn't connect the picker signal";
              }
    }
    
    void ApplicationUI::onContactsSelected(const QList &contactIds) {
    
        qDebug() << "contacts" << contactIds;
    }
    

    applicationUI.hpp

    public:
        ApplicationUI(bb::cascades::Application *app);
        virtual ~ApplicationUI() { }
    
        Q_INVOKABLE void contacts();
    
    public slots:
        void onContactsSelected(const QList &contactIds);
    

    . QML

    Button {
                    id: contact
                    text: "Pick Contact"
                    onClicked: {
                        cpp.contacts();
                    }
    
                }
    

    Now, given that the function is entirely in c ++, you should be able to take your code to

    _app.getContactPhoneNumber(selectedContactsIds[i]);
    

    and just insert into onContactsSelected to get your phone numbers

    I hope that helps!  Now I know how to do it too =)

    P. S.

    If you are still having a problem where something must certainly work and it is not, it is very likely that you will succeed if you just pass it to the c code ++ like theres probably a problem with the QML support.

  • Need help with work flow problem: a single e-mail notification non-stop.

    Hello

    We have created an approval Workflow custom PO based on the standard PO approval workflow and we had it for awhile now. Last week, we had a problem where the notification keeps on sending e-mail to suppliers and buyers. We discovered that the notification_id given in table WF_NOTIFICATIONS keeps having updated by the minute affecting the MAIL_STATUS Invalid then SENT back, then back to INVALID again and so on. We think that what is updated in this table is the cause, but so far we have not found what is updated. Here are a few of our instance.

    Oracle Applications: 11.5.10.2
    Database: 10.2.0.4 64bits
    OPERATING SYSTEM: AIX
    Custom workflow based on the 115.127.11510.16 review

    Customizations:
    -Created in custom notification that xx_email_po_pdf_supp based on EMAIL_PO_PDF_SUPP.
    -Creation of custom message XX_EMAIL_PO_PDF based on EMAIL_PO_PDF.
    -Added #WFM_CC to XX_EMAIL_PO_PDF.
    -Creating custom attribute XX_PO_WF_EMAIL_PERFORMER and set as an interpreter to the XX_EMAIL_PO_PDF_SUPP notification.
    -Created the custom XX_ADDTL_STARTUP_VAL function right after "Set Workflow start values of service." This function sets the #WFM_CC attribute and the XX_PO_WF_EMAIL_PERFORMER attribute.

    Not sure if the customizations have nothing to do with the question since not all POs have this problem. Anyone have this experience? Appreciate help with this.

    Thank you
    Allen

    Just to review this thread, can help you
    Workflow Notification Mailer is Spamming accounts of e-mail users [1293792.1 ID]
    Thank you

  • Firefox load any website in a proper way. It loads the wise online website. I'm not facing any problem with other browsers. Can you help me with this problem?

    Hello

    Firefox does not load any website in a proper way. It loads the website, but not in an appropriate manner. It loads in the good column.
    Another website are load appropriately.
    Can you help me solve this problem?

    Thank you

    You can try the following steps in case of problems with web pages:

    You can reload webpages and ignore the cache to refresh potentially stale or corrupt.

    • Hold down the SHIFT key and click the Reload button
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Command + shift + R' (Mac)

    Clear the cache and delete cookies only from Web sites that cause problems.

    "Clear the Cache":

    • Firefox/tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox/tools > Options > privacy > "Use the custom settings for history" > Cookies: "show the Cookies".

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe

    See also:

  • I can't shoot at a site in the usual browser... in navigation private. I can pull up in other browsers and could pull up 2 weeks ago... now I can't. Please help me solve this problem?

    Question
    I can't shoot at a site in the usual browser... in navigation private. I can pull up in other browsers and could pull up 2 weeks ago... now I can't. Please help me solve this problem? Also, I can' signed in 'members only' in private browsing mode.

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Tools > Options > advanced > network > storage (Cache) offline: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Tools > Options > privacy > Cookies: "show the Cookies".
  • I bought the iphone 6 s more time face in Saudi Arabia. I need to check if the original phone to apple or duplicated. So please help me find this problem.

    I bought the iphone 6 s more time face in Saudi Arabia. I need to check if the original phone to apple or duplicate. So please help me find this problem.

    Hey there, I guess your question is "how to determine if my iphone is true or false. If Yes, then if you go here https://selfsolve.apple.com/agreementWarrantyDynamic.do just enter your serial number and code and if his 'real', then it will show you the model of the Iphone and guaranteed dates. If this isn't the case, then you know the rest. If this is not the case then try to download apps from the app store and run or can it connect to itunes. Tell me what best worked: D - Jon

  • I recently buy iPhone 6 s he'S / has and unfortunately the glass of my phone was broken, is it possible to change a new and that I should pay the penalty or not? Can you help me solve this problem? Thank you

    I recently buy iPhone 6 s he'S / has and unfortunately the glass of my phone was broken, is it possible to change a new and that I should pay the penalty or not? Can you help me solve this problem? Thank you

    See http://www.apple.com/support/iphone/repair/screen-damage/.

  • In the remote desktop while printing 2 or 3 pages printer usn suite. It is printing only first page. Pls help me solve this problem

    In the remote desktop printing 2 or 3 pages continuously. with the USB printer. It isn't printing first page only 2nd and 3rd pages. But in the task of the printer local special impression is get queue. It's like appear and disappear. Please help me solve this problem

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums. You can follow the link to your question:

    General Forum(Windows Server) Technet

    Hope this information helps.

  • When you install the 2007 Microsoft Office Suite Service Pack 2 (SP2), I still received the error code 646... I tried to download the RegCure as advised, but the problem still exists... Please help me with this problem... Thank you

    Ideas:

    • When you install the 2007 Microsoft Office Suite Service Pack 2 (SP2), I still received the error code 646... I tried to download the RegCure as advised, but the problem still exists... Please help me with this problem... Thank you

    I tried to download the RegCure as advised, but the problem still exists...

    Who advised you to 'download... '. RegCure? Doing so could only worse issues! If you ever think that your registry database must be cleaned, repaired, boosted or optimized (it isn't), read http://aumha.net/viewtopic.php?t=28099 and draw your own conclusions.

    See http://social.answers.microsoft.com/Forums/en-US/vistawu/thread/6e716883-7af4-4a9f-8665-2f4dd57eee8d ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • I can't sign into windows live messenger, I get the message that windows live messnger is unavailable currently try again later and also I get the error code 80048820, can someone help me solve this problem. __

    I can't sign into windows live messenger, I get the message that windows live messnger is unavailable currently try again later and also I get the error code 80048820, can someone help me solve this problem.

    Hello jabeena, welcome.

    This section would apply in fact to the Windows Live programs, but we'll see what we can do to help out you.

    I recommend to try this first:

    1. disable any antivirus software or security, you have running on your computer. Looking for software to disable that contains a firewall.

    2. click on START
    3. Type "cmd" (without the quotes). Right-click on the result at the top of the menu START and select 'run as administrator '.
    4 type the following and press enter

    Regsvr32 softpub.dll wintrust.dll initpki.dll

    5. then type the following command and press enter

    netsh winsock reset

    6. restart your computer and see what happens.

    Thank you! Ryan Thieman
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Windows the dates that I am up to 22 gigabytes off 69.5 gigabits on drive D. Can someone help me with this problem so I don't run out of space

    original title: windows dates

    on my computer windows vista home basic, is Drive - D were all my windows updates are stored. I do not stor photos or other long-term files on my computer.
    I ' am up to 22 gigabytes of 69.5 gigabits on drive D. Can someone help me with this problem so I don't run out of space.
    Also all update my windows go back as far as the year 2008. Note-windows update are the only element which appear on the D drive and also when I backup windows is were I notice less space on this drive. Is there something I can do so I don't run out of space on this drive?
    could someone help me with this problem.

    I have found, do not delete the old windows updates.
    they could corrupt your entire system.

  • Problems to regain the QML C++ enum; JS is undefined instead of an int.

    I followed the path of BB to regain the enums in C++ QML discussed here:

    http://supportforums.BlackBerry.com/T5/native-development/HOWTO-C-enum-in-QML/m-p/2345641#M21139

    However I'm getting back the value JS "undefined" of my logic of C++ biz instead of what I want (i.e., an integer that corresponds to my enum type).

    The scenario is that I want to restore the data from the application of a backup and do a lot of validation of each step of the restore if something goes wrong, I can post a dialogue of restoration has failed no credits that could help the user recover.

    I have a class enum setting as follows:

    #ifndef RESTOREFAILURETYPE_HPP_
    #define RESTOREFAILURETYPE_HPP_
    
    #include 
    
    class RestoreFailureType: public QObject
    {
    
        Q_OBJECT
        Q_ENUMS(Type)
    
    public:
    
        enum Type {
            Success = 0,
            JSONReadFail = 1,
            UndoFileRemoveFail = 2,
            CopyToUndoFail = 3,
            DestFileRemoveFail = 4,
            CopyBackupFileFail = 5,
            ValidateSchemaFail = 6
        };
    
        RestoreFailureType();  // Empty constructor defined in .cpp file
        virtual ~RestoreFailureType(); // Empty destructor defined in .cpp file
    };
    
    #endif /* RESTOREFAILURETYPE_HPP_ */
    

    I save this class as an increables type in my app delegate:

    qmlRegisterUncreatableType("myApp.restoreFailureType", 1, 0, "RestoreFailureType", "RestoreFailureType provides enum values.  It cannot be instantiated.");
    

    I have a DataManager class that takes care of managing the operations of store, backup, restore, etc CRUD/user support, with what restoration function:

    In DataManager.hpp:

    Q_INVOKABLE RestoreFailureType::Type restoreFromBackup(QString backupFileName, int selectedIdForUndo);
    

    in DataManager.cpp (here I show a fake draft.  Since not even that much is still working, the rest of the logic of biz is not relevant to this discussion:

    RestoreFailureType::Type DataManager::restoreFromBackup(QString backupFileName, int selectedIdForUndo) {
        return RestoreFailureType::Success;
    }
    

    And in my QML UI layer, I import the type:

    import myApp.restoreFailureType 1.0
    

    And a FilePicker component supports passing the name of the backup file to the DataManager.  The FilePicker and his onFileSelected() slot:

          FilePicker {
                id: backupRestoreFilePicker
                type: FileType.Other
                allowOverwrite: true
                directories : ["/accounts/1000/shared/documents/MyApp"]
                viewMode: FilePickerViewMode.ListView
                onFileSelected: {
                    if (mode == FilePickerMode.Saver) {
                        // Save mode stuff for doing backups
                    } else if (mode == FilePickerMode.Picker) {
                        var restoreResult =  _dataManager.restoreFromBackup(selectedFiles, _appSettings.selectedId);
                    }
                }
            }
    

    I tried to remove the code down for everything that is relevant to this question.

    When I put a breakpoint on the line where the var restoreResult JS is defined:

    var restoreResult =  _dataManager.restoreFromBackup(selectedFiles, _appSettings.selectedId);
    

    and step, restoreResult, var JS becomes the value "indefinite".  From what I read in the thread mentioned above, restoreResult is supposed to get a whole number (in this case he should get zero method justiciable restoreFromBackup how I generated), that I can then compare to imported enum type.  I should be able to compare the return value of restoreFromBackup to see if it is equal to one of:

    RestoreFailureType.Success
    
    // or:
    
    RestoreFailureType.JSONReadFail
    
    // or:
    
    RestoreFailureType.UndoFileRemoveFail
    
    // or:
    
    RestoreFailureType.CopyToUndoFail
    
    // etc...
    

    I think others have got it working, and miss me him probably just a few details.  A lot of satisfaction to anyone who can identify the error/omission or even give a good lead.  In addition, comments are welcome on if I'm trying to manage this scenario in a recommended manner.  My intention is to use the listed failure code to customize a SystemDialog message that may help the user recover from a restore operation has failed.  The restore file might have been corrupted in a way that is not analyzable JSON, or the user could have selected a file that isn't even a backup file created by my application, or they could have revoked authorization, or JSON can be analyzable, but the user could not resist the temptation to manually change the values in their backup file etc.

    Hmm,

    Sometimes all you have to do is to talk, even if you speak to yourself.

    I changed my function DataManager to return my type listed as int instead of as the enum, and I don't have the correct integers in QML, anything can still be compared using the enumerated type.  So:

    Q_INVOKABLE RestoreFailureType::Type restoreFromBackup(QString backupFileName, int selectedIdForUndo);
    

    becomes

    Q_INVOKABLE int restoreFromBackup(QString backupFileName, int selectedIdForUndo);
    

    and

    RestoreFailureType::Type DataManager::restoreFromBackup(QString backupFileName, int selectedIdForUndo) {
        return RestoreFailureType::Success;
    }
    

    becomes

    int DataManager::restoreFromBackup(QString backupFileName, int selectedIdForUndo) {
        return RestoreFailureType::Success;
    }
    

    and I can do now:

    var restoreResult =  _dataManager.restoreFromBackup(selectedFiles, _appSettings.selectedId);if(restoreResult == RestoreFailureType.Success) { // Do success stuff} elseif(restoreResult == RestoreFailureType.JSONReadFail { // Do JSON read fail stuff} else...
    

    This isn't quite how it was recommended in the thread, I mentioned in the previous post... but it seems to work for what I need.

  • Error "uh oh, the stage of rendering impossible.". Some features may be disabled. "pls help to solve this problem. Can't function without it

    Cannot use the extract error is: "uh oh, step of rendering impossible.". Some features may be disabled. "pls help to solve this problem. Can't function without it

    The forum of the extract is HERE.

    From the looks of things on this forum, you are not the only one having this problem now. Maybe someone will have an answer.

    -OB

  • Hello, I have version Adobe Acrobat 11. I have complete documents and send them to customers. However, when customers open the documents on their side, they are empty. The filled information are missing. Can you please help me with this problem?

    Hello, I have version Adobe Acrobat 11. I have complete documents and send them to customers. However, when customers open the documents on their side, they are empty. The filled information are missing. Can you please help me with this problem?

    Why are publish you again? You must first answer the question I ask in your original thread.

Maybe you are looking for