InvokeRequest works not when it is passed to a Notification

My new app uses previews to display important messages when the application is not in the foreground. I want the user to be able to exploit the preview and make my application to the foreground. Help on the basis of Roger Leblanc and headless app BlackBerry documentation (which is the only BB docs I found that talk about that), it should be as easy as creating an InvokeRequest, setting the target to the reverse URI for your application and then passing the request to the object of the Notification before calling it in fact. The problem I have is that this does nothing when the user clicks on the instant preview. Notice that I am only invoke the instant preview... notification does not appear in the hub. It's my code...

InvokeRequest request;
request.setTarget( "com.mycompany.myapp" );

Notification* notification = new Notification( this );
notification->setTitle( title );
notification->setBody( body );

notification->setSoundUrl( QUrl( "file://path_to_sound/sound.mp3" ) );
notification->setType( NotificationType::HubOff );
notification->setIconUrl( QUrl::fromLocalFile( QDir::currentPath() + "/app/public/icon.png" ) );
notification->setInvokeRequest( request );

notification->notify();

Has anyone had success with this and might be able to point out what I am doing wrong?

greenmr wrote:

My new app uses previews to display important messages when the application is not in the foreground. I want the user to be able to exploit the preview and make my application to the foreground. Help on the basis of Roger Leblanc and headless app BlackBerry documentation (which is the only BB docs I found that talk about that), it should be as easy as creating an InvokeRequest, setting the target to the reverse URI for your application and then passing the request to the object of the Notification before calling it in fact. The problem I have is that this does nothing when the user clicks on the instant preview. Notice that I am only invoke the instant preview... notification does not appear in the hub. It's my code...

InvokeRequest request;
request.setTarget( "com.mycompany.myapp" );

Notification* notification = new Notification( this );
notification->setTitle( title );
notification->setBody( body );

notification->setSoundUrl( QUrl( "file://path_to_sound/sound.mp3" ) );
notification->setType( NotificationType::HubOff );
notification->setIconUrl( QUrl::fromLocalFile( QDir::currentPath() + "/app/public/icon.png" ) );
notification->setInvokeRequest( request );

notification->notify();

Has anyone had success with this and might be able to point out what I am doing wrong?

You also define the right target in your file of bar - descriptor.xml?

Tags: BlackBerry Developers

Similar Questions

  • My Apple iPhone 5 touchscreen doesn't work not when the call comes. This problem is only in locked mode and mode unlocked when the call come it works normally. The problem is only locked Iphone and a just coming guard time. give soltn

    Hello can anyone give solution to my problem.

    my iPhone touch 5 works not when it is in locked mode and it's time all incoming call came the touch works do not. other times, the touch works normally wat is the problem. ?

    If you disturb not activated. Settings > do not disturb.

  • HP ProBook 440 G2, fingerprint reader works not when I upgraded the Win 7 Pro form to win 8.1 Pro

    My HP ProBook 440 G2, finger print reader does not when I upgraded the Win 7 Pro form to win 8.1 Pro.

    Device manager showing the biometric reader works correctly. But in fact, the finger printer reader is not reading or senseing. It seems that the part "dummy". Please help me to correctly configure step by step for that matter.

    Thank you

    Hillet

    Have you installed the software driver validity sensor fingerprint for Windows 8.1?

    http://h20564.www2.HP.com/hpsc/SWD/public/detail?sp4ts.Oid=6943811 & swItemId = ob_134806_1 & swEnvOid = 4158

    See page 64 in the manual Windows 8.1 according to the configuration of fingerprints of validity information

    http://h20565.www2.HP.com/hpsc/doc/public/display?sp4ts.Oid=6943810 & docid = emr_na-c04371762 & docLocale = en_US

  • Ports USB U2312HM works not when connected to USB 3

    I use a U2312HM to work, but when I plug the USB connector to a USB 3 port on my laptop, the USB 2 ports on the monitor are not recognized. Device Manager shows it as an unknown device and no drivers to install can be found. When I use a tool like slim or driveridentifier drivers it doesn't ID the device but shows not all compatible drivers.
    When I connect the monitor to the only USB 2 port, I have on my laptop that hub is USB monitor comes to life, but I'm already using this USB port for another purpose. Can anyone tell my where I can find the correct drivers?
    I'm running Windows 7 Pro SP1 on a Dell Latitude E6530, processor Intel Core i7 3770QM with 8GM ram.

    Kvwielink,

    Install this driver, restart when done, repeat the test.

    Intel USB 3.0 eXtensible Host Controller Driver
    https://Downloadcenter.Intel.com/Detail_Desc.aspx?DwnldID=21129

  • moviescript works not when the flash file is on stage

    My keydown script on will not work as long as I have a swf file on the stage that has a text entry field in the first image, which I use to set a variable in the swf file.

    Even if I go to another image of the SWF without the input of text field, I can't yet use keydown to the Director.

    If you know the tricks of jargon that would be great.

    Or plan B would be to set the variable in the Director and send it to a swf that has no text entry field.  But I'm not sure how to pass variables to a swf file.

    And the jargon that I saw online does not work for my swf named 'digitalclock' that has a variable "hours":

    Sprite () 'digitalclock'). setVariable (hours, 1,)

    Or plan A would be if you know clocks to digital reading to the Director who may have their departure hours and minutes set by the end-user.

    Thank you

    There are many possible solutions.

    Here is a demonstration that is too simplistic.

  • Windows Paint text installation will not work and the 'A' accentuates not when the cursor passes over it

    I just wanted to put some txt on photo paint open so imported the scanned picture and everything else works, but the ease to enter text. Move the cursor over the 'A' does not the highlight box around him upward and toolbars from view has the text one checked but dimmed down. Is the same for an empty document in the paint.

    Two ideas...

    (1) Vista paint text button does not work:
    Reach... View / Zoom / Custom / 100% / OK

    (2) I was wondering after leaving by clicking on the 'A '...
    What happens if you move the pointer over
    the picture and left click or drag to create a
    TextBox?

    The following links may be useful:

    Windows Vista-
    Open Paint
    http://Windows.Microsoft.com/en-us/Windows-Vista/open-Paint

    With the help of paint
    http://Windows.Microsoft.com/en-us/Windows-Vista/using-paint

    Paint tools
    http://Windows.Microsoft.com/en-us/Windows-Vista/paint-tools

    How to rotate an Image using Microsoft Paint
    http://maximumpcguides.com/Windows-Vista/how-to-rotate-an-image-using-Microsoft-Paint/

    Microsoft Paint-
    How to add text to digital pictures in Vista
    http://www.ehow.com/how_5841367_add-text-digital-pictures-Vista.html#ixzz1lC2YSoS8http :// www.ehow.com/how_5841367_add-text-digital-pictures-vista.html

  • Wireless mouse not working not when the games starts

    I have a logitech LX6 wireless mouse and keyboard. They stand work very well in the main menu of Windows 7 and surf the Internet, how ever when I start a game (I tried WoW and SUP Commander) the mouse stoped working and everything I could do on the keyboard was out esc. Any ideas.

    It's strange.  You have another mouse and recently pass to it?  Or have you had it for awhile and the mouse has started to act like that?

    I could certainly go to the Web from Logitech site and see if there are any updated drivers for your mouse.  Also, make sure that you don't have another mouse plugged in at the same time playing these games.  I guess you do not, but sometimes a game will remember your previous settings of the mouse, and when you go play, he thinks that the mouse is always there.  So, you will need to uninstall and reinstall your games.  However, I would do that as a last resort.  If your mouse is new, you may contact support of Logitech to see if they know work around or solution.

  • Contact ID works not when the iPad 9.7 Pro is supported

    My iPad running iOS 9.3.1 Pro 9.7 is only a few days old and working perfectly except for one question...

    When connected to the charger the Touch ID does not recognize the fingerprint to unlock the device.  As soon as I unplug the accusations, everything works well again.  I've already talked to Apple, however, we thought that resetting factory solved the problem, but in reality all that has changed is that the charger As disconnected.  Before going back to Apple once again, I thought I would check with the experts.  :-)

    Thank you...

    various reasons are cited-

    1 low power mode

    2 electrical interference

    3. no standard charger

    Not sure, there is a unique solution

    iPhone 5 s Touch ID does not not then plugged on charge, charge.

  • Satellite Pro M30 graphics works not when the driver is installed

    Hi all

    I m having problems with my nvidia Geforce FX Go5200, in a portable Satellite Pro M30, (processor Intel Pentium M 1.7 GHz, 512 MB Ram). This card was working fine suddenly the laptop stops.

    I formatted the laptop and installed Win XP PRO. After installing the driver VGA, I restarted the laptop, but black screen started to come right after the Win XP splash screen appears. The laptop continues to start up but no screen.

    It starts fine in safe mode. I get my best screen simply by disabling the geforce card or uninstall the driver. I tried to install a new driver for the VGA on the download from Toshiba site, but same problem appears. I also tried the BIOS update but nothing happens.

    Can someone help me?
    [email protected]

    It's very strange question. It will be really interesting to know if this happens when you use the CD delivered recovery facilities.

    In any case, I assume that there is a problem with the LCD display. In safe mode, the desktop appears in the resolution decreases but the resolution to the OS boot will be suitable for a standard (1280 x 800), and of course, there is the problem.

    I am not a technician, but I recommend you contact the Service partner. AFAIK they use special tools and programs for display tests. They can tell you more.

  • HP Pavilion Gaming: Touchpad works not when you press keys

    As the topic says I can not use the keyboard and mouse at the same time. I tried to disable Smart sense in the Symantecs click buffer settings by moving the slider all the eway to the left, but this has not solved. I also went in the mouse and the parameters of the touchpad and value no delay, but it also did not resolve my problem. I have the latest drivers (19.2.11.38) installed. Is there another setting I'm missing?

    Hello

    Normally, you just have to disable SmartSense or PalmCheck Control Panel of Synaptics - but from what I've seen, it seems no longer works for Windows 10 versions of this driver.

    You may be able to work around this problem as follows.

    First, download the Synaptics driver on the link below and save it in your downloads folder.

    Version of the Synaptics 17.0.18.8 driver

    Disable your wireless card (should be f12 ).

    Open Control Panel, open programs and features, right click on the Synaptics driver and select uninstall.

    When finished, restart the laptop.

    When windows rebooted, open your download folder and re-run the installer of Synaptics - when it is finished, restart the laptop.

    Open the Synaptics settings panel, disable SmartSense or PalmCheck , then check if the touchpad works now with a key on the keyboard is pressed.

    If so, turn on your wireless card and use the utility on the following link to prevent Windows 10 to update automatically the Synaptics driver.

    https://support.Microsoft.com/en-GB/KB/3073930

    Kind regards

    DP - K

  • Micro works not when using Skype. Problem is not with the microphone, but with Skype. Ive tried

    When you use Skype, my internal microphone does not work - friend says that he can not hear the voice, but he can hear other sounds - music on youtube for example. Ive tested the microphone on Skype Echo - it wasn't working at all. I tested it on a voice recorder - MIC was working properly. Also when I just started to use this laptop (3 days ago), I spoke with a friend through Skype for about 3 hours, and then he couldn't hear me suddenly annymore. If something is wrong with Skype. Computer consultant suggested me to contact Skype support technicians.

    In Skype, open Tools-> Options-> Audio settings. There is more than one option available in the selection box for Microphone?

  • Z500 touchpad work not when you use the keyboard. Please help me please!

    Hello

    I recently bought a lenovo z500 and it's great, but I have a little problem. When I use the keyboard to play games (I use the WASD keys) the touchpad does not, which means I can't play. Help, please!

    I got it finally started working by removing the pilot of the momentum. I don't think that I will reinstall it. Thanks for your help

  • Venue Pro 11 on screen keyboard works not when the keyboard of the Tablet is connected

    I know that we are aware of this problem:

    When the lid of the keyboard of the Tablet is returned to the back of the shelf, they keyboard does not. but windows 8 still recognizes its connected and the screen keyboard it does not automatically jump upward.

    The Surface and the RT Nokia tablet correctly, both work. It's going to be a fix for this in the future? Is this a software problem or a problem with keyboard? It's really a big problem that needs fixing because it let the unusable keyboard cover. I am seriously considering to take the Tablet back because of this problem. Any information would be appreciated.

    There is already another thread on this - please check it and close this one as replied.   Thank you.

    http://en.community.Dell.com/support-forums/mobile-devices/f/4586/p/19535674/20497309.aspx#20497309

  • Submitting a form offline works not when Wifi is disabled

    I'm trying to implement a simple form that is available to users when online or offline.

    I have two files in the same folder on my server

    simpleEntryForm.htm

    sends data to:

    testSQL5.php

    I can present .htm .php when I am connected to Wifi, but when I cut my Wifi connection, I get the message:

    "Cannot visit web page when the radio is off."  Please turn the radio on and try again. »

    Is the page that submit to be .asp or can it be a .php page?

    I made sure to visit the page and submit form data between the .htm and .php first with internet access with success before trying offline.

    I need to work on BlackBerry OS 5 and OS6

    I have hidden in my simpleEntryForm.htm page fields:


    In fact, here's the whole simpleEntryForm.htm (anyone can see what I'm doing wrong?):

    http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.DTD">
    http://www.w3.org/1999/xhtml">
     
      MyMTA
      


     

    YOU ARE NOW ON THE SERVER OF V-NOLITA

    http://38.96.130.170/ComNet/testSQL5.php"onsubmit =" return validateForm(); ">


    [email protected]"/ >


         
      
     
         
      


         
      


         
      
     
         
      
     
         
      
     
         
    Type of presentation:

         
         
    Online or offline?

         
         

       
       
       
    Image:

    OPERATING SYSTEM:

         
         
    Metro line:

         
         
    Station:

         
         
    Geographical area:

         
         
      
     
          Details on the problem/situation (optional):

         
         
      



    Thank you!!

    Thank you

    Yes, TheSource - I'll have to do it this way (even though I DETECT and submitting background - my customer does not want to have to synchronize).  Queuing offline unfortunately does not work with OS 6 (thanks to abarber for letting me know that).  Queuing offline would have been a lot easier for me option if it worked with OS 6.

  • UCCE 8.5.4 - Whisper works not when agents are available

    Hello

    I configured the murmur to play for a group of skills, and it works only if the call is on hold, and no agent is available. When an agent becomes available, the whisper plays. However, if there are agents available at the time the call is sent to the queue to the node of the skill, the murmur does not play. If anyone has experienced this?

    Thank you

    Brian

    Group competence app_media_lib and media_server value in front of the queue and then test.

Maybe you are looking for

  • Options will not keep the update page to display my chosen homepage

    Why browser keeps showing 2 tabs? One is the update page and the other is my chosen homepage. I tried the options but it doesn't work.

  • Problem with the HP Pavilion dv6563cl

    Hello I have a HP Pavilion dv6563cl laptop (GA406UAR #ABA), who was supposed to have a GeForce 8400 M GS graphics card. However, after a failed repair, I realized that the graphic chipset on the motherboard is a G86-730-A2, which corresponds to a GeF

  • Touch-pad stopped working immediately after the automatic windows update

    I was using my computer last night and have downloaded an automatic update of windows, so I restarted my computer so she could install the updates and as soon as updates when installed my work key touchpad stopped. Toshiba Satellite A215-s7472. I plu

  • Zoo Tycoon 2: Ultimate Collection Disc 3 error

    I bought Zoo Tycoon 2: Ultimate Collection on amazon.com and I'm having a problem installing. Setup cross disk 1 and 2 with no problems, but it does not seem to recognize the disc 3. I put it in drive and it just keeps popping up a message to insert

  • How to cancel one of my membership?

    I wanted to make the cancellation of the annual of the Creative Associationbecause of an omission eventually signed twice and I wanted to the CloudCancel to stay with a single