finished() signal for invoke() on phone app)

I use bb::system:InvokeManager to start a call using action 'bb.action.DIAL '.

response of bb::system:InvokeTargetReply * const = invokeMgr.invoke (invokeRequest);

Invoke() will return an InvokeTargetReply. This response will signal finished(). I use

Boolean result = QObject::connect (response, SIGNAL (finished (()), this, SLOT (onInvokeResult ()));

to connect the signal with the slot. However, my CRACK onInvokeResult() is never called. Why is this?

(1) something wrong with my application?

(2) signal/slot mechanism only works inside your own application. If this approach can be used when calling invoke() to an external application. Signal/slot isn't an IPC mechanism.

Documentation says errorType and errorCode is valid after the finished() signal.

BB::System:InvokeTargetReply * response = qobject_cast(sender());
BB::System:InvokeReplyError:type errorType = response-> error();
int errorCode = response-> errorCode();

If the signal/slot mechanism cannot be used internally within your own application, how can you know if the invoke() on an external application would be successful?

I wasn't looking to extract the right aways errorType and errorCode after calling invoke()... maybe that can already tell me the result?

BR, René

Thanks for sharing this code. My code is almost the same. And I solved the problem. My code now looks like this:

BB::System:InvokeManager invokeMgr;
response of BB::System:InvokeTargetReply * = invokeMgr.invoke (invokeRequest);
If (answer)
{
Set the parent for this 'response' otherwise 'response' will be deleted at the end of this function.
response-> setParent (this);
Boolean result = QObject::connect (response, SIGNAL (finished (()), this, SLOT (onInvokeResult ()));
...

void controller:nInvokeResult()
{
Get the response from the sender object
BB::System:InvokeTargetReply * response = qobject_cast(sender());
BB::System:InvokeReplyError:type errorType = response-> error();
int errorCode = response-> errorCode();

response-> deleteLater();
}

It turns out that it is absolutely essential to add a parent to the response using the line "answer-> setParent (this);" in order to receive the signal finished(). If this line is commented out, then the slot is more will be called.

You may not use a local variable for the answer, but a member of the class. That also seems to work.

Thanks for the help!

BR, René

Tags: BlackBerry Developers

Similar Questions

  • iPhone 6 problem after installing IOS 10.0.2 - phone app keeps freezing for 30 seconds

    After installing IOS 10.0.2 on my iPhone 6, the phone app keeps freezing when I open it and remains frozen for about 30 seconds.  Then it closes its doors.  Then only can open and use the phone/directory.  Does anyone else have this problem?

    My husband and my phone do the same thing. We are constantly reset. Very frustrating!

  • How can I find the history of the app on itunes or the app store for my iphone 5? I got an iphone 5s and it broke... now I have another but want to see the history of my old phone apps.

    How can I find the history of the app on itunes or the app store for my iphone 5? I got an iphone 5s and it broke... now I have another but want to see the history of my old phone apps.

    If you are connected to the same Apple ID you used with the old iPhone, just open the App Store App and look in the tab under purchased for applications updates.

    And less... More-> purchased in the iTunes App for music, movies etc...

  • Why my Windows Phone app (for desktop) does not open?

    I connect my WP8 to my laptop. Open Windows Phone app to sync music.

    And this happens:

    The signature of the whole problem:

    Signature of the problem:
    Problem event name: CLR20r3
    Signature of the problem 01: windowsphone.exe
    Signature of the problem 02: 1.0.1720.1
    Signature of the problem 03: 519a6ab5
    Signature of the problem 04: Microsoft.Practices.Unity
    Signature of the problem 05: 2.1.505.2
    Signature of the 06 problem: 5004782f
    Signature of the problem 07: 30 d
    Signature of the problem 08: 0
    Signature of the problem 09: System.ArgumentNullException
    OS version: 6.1.7601.2.1.0.768.3
    Locale ID: 1033
    Additional information 1: 0a9e
    More information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional information 3: 0a9e
    Additional information 4: 0a9e372d3b4ad19135b953a78882e789

    I tried to uninstall and install again. I have completely updated my laptop and repeat the process of re-installing and he still does not work.

    Hello Jaycub,

    Thanks for posting your query in Microsoft Community Forum.

    What is the brand and model number. the phone?

    The question may arise for various reasons, including a problem with the USB, all recent software update etc. So, I would suggest trying the following steps and check if the problem still persists.

    Method 1:

    Please, try the steps in the following Knowledge Base article.

    Windows Phone 8 is not detected by your computer

    http://support.Microsoft.com/kb/2749484/en

    Method 2:

    You too, try the next solution.

    Try to log in and cancel the success of sync, then try to uncheck auto sync - I hope that this should prevent the app crash the next time you connect.
    For more information on uncheck auto sync, please see the following thread:

    http://answers.Microsoft.com/en-us/WinPhone/Forum/wp8-wpstart/wp8-connector-for-OSX-crashing-on-launch/fbe20bb0-2bcf-4B86-a1f9-fffaa69ac1eb?page=3

    Hope this information is useful. If the problem still persists, please post back for further assistance, we will be happy to help you.

  • Watch app phone has "complications" for two of my apps what would you say

    Two of my phone apps show complications to watch what it means

    This means that they can display information on the dial of the watch. These elements in the corners are "complications".

  • InvokeTargetReply finished() signal not shooting?

    I have a problem like that in the original post in this thread:

    http://supportforums.BlackBerry.com/T5/native-development/invokation-framework-slot-for-signal-Finis...

    The poster of thread apparently solved their problem for their use case by invoking a card instead of an application, but this solution is not suitable for my use case - I simply invoke a basic application, by using a reusable code taken right out of BlackBerry tutorials, and apparently, so the launch of base app, finished() signal is not emitted.  This seems so basic that I expect others have run across it, and there is a subtle touch that is not sufficiently covered in the tutorials.

    Code:

    void ApplicationUI::launchCoreApp() {
    
        qDebug() << "The launchCoreApp() method was called";
    
        bb::system::InvokeManager invokemanager;
        bb::system::InvokeRequest request;
    
        request.setAction("bb.action.OPEN");
        request.setTarget("sys.browser");
        request.setUri("http://www.blackberry.com");
    
        bb::system::InvokeTargetReply *reply = invokemanager.invoke(request);
    
        if(reply) {
            if(reply->isFinished()) {
                qDebug() << "In launchCoreApp(), reply finished before we could connect signal to handler slot";
            } else {
                qDebug() << "In launchCoreApp(), connecting reply finished signal to handler slot";
                bool ok = connect(reply, SIGNAL(finished()), this, SLOT(onInvokeTargetFinished()));
                Q_ASSERT(ok);
            }
    
        }
    
    }
    
    void ApplicationUI::onInvokeTargetFinished() {
        qDebug() << "The onInvokeTargetFinished() slot was reached";
    }
    

    Note that this is just a test code and I didn't intend to instantiate a new InvokeManager on each call to the launchCoreApp() function - I just need to see how things work.

    So, when I run the above, launches the browser and goes to the provided URI, my debug console told me that the value of reply-> isFinished() is false, so my code takes the branch to connect the finished() signal to the onInvokeTargetFinished() slot.

    However, the slot is apparently never called, not the browser launch and not when I close the browser.

    It's reusable code light directly from the tutorials and docs, but it doesn't seem to work as announced.

    When subtle I'm missing?

    Where in the lifecycle of the invocation request response is the finished() signal is supposed to be issued?  The reference docs are very clear on this - they just say it is issued when the response message is "received", whatever that means (I understand that it is a future model, I'm not clear which is received in the life cycle integer invocation response).

    I am compiling against level API 10.2 BTW.

    I work, the only thing needed is to define the parent for the response, otherwise it will be deleted at the end of the function where it is created.

        bb::system::InvokeTargetReply *reply = invokemanager.invoke(request);
        reply->setParent(this);
    

    The parent is responsible to remove the answer, so be sure to remove it in your home.

    void ApplicationUI::onInvokeTargetFinished() {
        qDebug() << "The onInvokeTargetFinished() slot was reached";
        bb::system::InvokeTargetReply *reply = qobject_cast(sender());
        reply->deleteLater();
    }
    
  • How to connect NotificationDialog finished() signal to a process without a head?

    I tried to get a process in the background to handle the signal in my application without head (because NotificationDialogs are now supported for background process).

    However, whenever I try to connect the signal to a slot, I get the following error:

    QObject::connect: Cannot connect (null): Finish (bb:latform::NotificationResult:Type) at MessageProcessor::dialogFinished (bb:latform::NotificationResult:Type)

    
    
    cpp file:
    
    QObject::connect(pNotificationDialog,SIGNAL(finished(bb::platform::NotificationResult::Type)), this,SLOT(dialogFinished(bb::platform::NotificationResult::Type))); //(for this line I also get the warning below)
    //MessageProcessor::dialogFinished(bb::platform::NotificationResult::Type) has not been //tagged as a Qt member; make sure all parameter types are fully qualified
    
    hpp file:
    
    #include 
    
    class MessageProcessor  : public QObject{
    Q_OBJECT
    
    public slots:
    void dialogFinished(bb::platform::NotificationResult::Type value);
    
    };
    
    Is finished() supported for headless apps?
    

    You are probably not initializing pNotificationDialog

    pNotificationDialog = new bb::platform::NotificationDialog(this);
    
  • BlackBerry Smartphones (App) not available for download from Blackberry App World

    I use a Blackberry Bold 9000 (personal use) on Bell Mobility.  The operating system is v5.0.0.681 (1137 Bundle, platform 5.2.0.64) and I'm in v2.0.1.12 App World.

    My App World worked well until I have asked me to set up my Blackberry ID.  Since then, App World is basically useless.  My main questions are:

    1. Whenever I try to connect on App World, I am taken to the additive screen of Blackberry App World membership.  I accept the conditions each time, but nothing is recorded, and I have to go through the same process the next time I log on.
    2. When I try to download updates to existing applications, I get the dreaded "...". not available for download on Blackberry App World. »
    3. When I try to download new applications (IE TSN Mobile), I get the same "... not available for download from Blackberry App World."

    After a very long session with Bell Mobility and RIM Technical Support staff, I was able to solve the problem I was experiencing.

    I initially created my Blackberry ID using my mobile device (9000 "BOLD").  Apparently, the program installation but unfinished and recorded properly and that was the root cause of all problems.  When I logged in Blackberry ID of my laptop, I was able to complete the installation in three steps process.  It was to download a plug-in on the Blackberry site, connect the phone to the laptop and then completing the installation program (including seizure of Paypal information, if you wish) on the laptop.

    After completing this process, I could connect the Blackberry ID on my mobile without having to go through the Blackberry App World membership additive and all my downloads have worked without error.

    IMPORTANT: the completion of recording Blackberry ID process must be carried out using Internet Explorer.  I had actually tried to do this a few days ago, but I've been using Google Chrome.  As a result, the global need App Plug In did not download properly on my laptop and I couldn't finish the rest of the installation procedure.

    I hope this helps other people who have faced this problem.

  • When I press the button Add card on my phone app here is I get the error message

    Hi thanks, my cards have been on my iPhone 6plus for quite awhile. I recently bought an iwatch series 1. Watch and phone software is up to date. My app to watch on my phone recognizes my cards when I press the map button Add on my phone app here is I get the error message.

    Hello

    To be able to add cards to pay Apple on your watch, it will first the configuration of the area selected (like on your iPhone):

    • On your iPhone, in the application of the watch, go to: Watch My > general > language and region - check Format correct region is selected.
    • If they are already correct, it can help to select again the two the same Format of the region and also the language of the system itself.

    Then follow the instructions here to add cards to the Watch:

    More information:

    Pay help, add maps of Apple - Apple Support

  • a laptop with a Wi - Fi hotspot wireless can use cell phone apps?

    a laptop with a Wi - Fi hotspot wireless can use cell phone apps?

    Firstly, your computer probably uses an Intel or AMD processor.  Only programs using the Intel instruction set have any prayer running on your PC.  A cell phone probably uses an ARM or Tegra processor with a set of instructions completely different.  There was no physical way for a cell phone application run on a PC.

    Second, your cell phone likely does not implement any type of SMB shares, so there is no way that a PC will be able to see it as a device which can be accessed on the network.

    Thirdly, the display on the PC hardware is completely different from that of the phone.  The application on the phone will include the PC hardware and be able to communicate with the PC drivers in order to interact with the PC hardware.  It is simply not possible with a cell phone application, written for the touch screen.

  • How to speed up my signal for Auntie plu photon strength?

    Original title: problem with Auntie photon more net connection

    How to speed up my signal for Auntie plu photon strength? My net is too slow & very dull.

    Hi shilpadarbar,

    Thank you for writing to Microsoft Communities. From your problem description, I understand that the internet connection is slow. Before you start the troubleshooting steps, I need the required information:

    ·         You get the error message?

    ·         Did you do changes on the computer before the show?

    Follow these methods to the problem of slow internet connectivity.

    Method 1: Follow these steps:

    Step 1: Start the computer in safe mode with network and check if the problem persists.

    Step 2: If the problem does not persist in safe mode with networking, perform a clean boot to see if there is a software conflict as the clean boot helps eliminate software conflicts.

    Note: After completing the steps in the clean boot troubleshooting, follow the section How to configure Windows to use a Normal startup state from the link to start the computer to a Normal startupmode.

    After the clean boot used to resolve the problem, you can follow these steps to configure Windows XP to start normally.

    (a) click Start, run.

    (b) type msconfigand click OK.

    (c) the System Configuration Utility dialog box appears.

    (d) click the general tab, click Normal startup - load all services and device drivers and then click OK.

    (e) when you are prompted, click restart to restart the computer.

    Method 2: Temporarily disable the security software.

    Note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you do not disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network during the time that your antivirus software is disabled, your computer is vulnerable to attacks.

    Method 3: Follow the steps in the article.

    How to troubleshoot network connectivity problems in Internet Explorer

    You can also see this article for more information.

    How to troubleshoot possible causes of Internet connection problems in Windows XP

    For internet speed and signal strength, you must contact the Auntie Photon support for more help and information.

    http://www.tataphoton.com/customercare.aspx

    If please follow the methods and let us know if you need more assistance. We will be happy to help you.

    Thank you.

  • found hardwre wizrd new appears for my Droid phone

    new hardware detected Wizard appears for my Droid phone

    Hello

    If I understand the question, find the new hardware wizard appears for Droid phone. Please let me know if this is not correct.
     
    Method 1:
    I suggest you run the fix it and check if it helps.
     
     
    Method 2:

    You can also check in If Device Manager the device GET detected there or not.

    (a) click Startand click Run.

    (b) type dvmgmt.msc and press on enter.

    (c) expand Bus USB controllers.

    (d) check if the device is detected or not.

    If the problem persists, I suggest you to contact the Support of Motorola Droid to get help.
     
     
    Hope this information helps you. If you need help or information, please reply to this message. I'll be happy to help you.
  • Don't boot to desktop-Boot computer ups always come with "no input signal" for monitor

    Thanks for the research on this issue.  So first of all, he could start after a few attempts in the end goes to the blue screen error at approx. 5 min. I started this path several times that in "safe mode with network" to try the many suggestions of repair for two days. " At this point, it's freezing just at "windows is loading files", but probably will go to blue screen error. Boot ups always come with "no input signal" for the monitor and signal switching in the Help menu for 5 min periods I've mentioned and then fails or "monitor going to sleep" occurs.

    The error messages rec'vd: corrupted image, corrupted file and header file check sum does not match the sum of computer control. The recommendations of the screen blue: disable the BIOS memory, any material current or drivers and check disk space.

    Some tent to fix: memory diagnostics and it showed 'no problem', checked monitor on another computer and it works, in a session of 5 min a download to 'fix' Microsoft via a USB problem like "search of windows crashes" but was 'unable to set', a few other attempts would show the "windows installer has stopped working" preventing any action.

    At the present time, am unable to start even with advanced at F8 options.  It's HP Pavilion 10/2007, with the help of HP. Its on a wireless network with a netbook, Blu - ray, occasionally a cell phone that works on windows live but none presents as a device.

    Hello

    ·        You did changes to the computer before the show?

    ·        What is the exact error message that you receive?

    Method 1: Remove the external devices except the keyboard and mouse and try to restart the computer in safe mode and check if you can start inside.

    If you are able to boot into safe mode then try a restore of the system it and check if it helps solve the problem:

    http://Windows.Microsoft.com/en-us/Windows-Vista/system-restore-frequently-asked-questions

    Method 2: I suggest you do a system recovery options system restore and see if it helps:

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-are-the-system-recovery-options-in-Windows-Vista

    Method 3: If the system restore does not help then do a startup repair and check if this solves the problem.

    http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions

  • Way to access compose the strings of the phone app?

    I'm developing on a device 7290 with software version 4.1 4.1/JDE.  I was wondering if there was a way to get the string that you entered in the phone app.  I'm doing this because I want to do a somewhat native mechanism for composition of phase two with a number stored in my application.  So when a user dials the number, they have the possibility of either compose regularly (already there, of course) or using my Dialer of two floors in the menu.

    The only thing I can think is to try recording an ApplicationMenuItem in the phone app.  I don't know if the object that is returned in the 'context' ApplicationMenuItem will contain the number you entered or if it would be just an entry PhoneLog for the prerequisites.  Runs tests on this one there would reveal the answer, the inspection of the object with getClass() calls and/or execution in the debugger for more details on the returned object.

  • Call phone app not called in work profile

    A duplicate of this http://supportforums.blackberry.com/t5/Cascades-Development/Invoking-a-Phone-call-in-Work-Profile-ap...

    In my application I have managed to make a phone call to a number using the native c ++ api in the profile phone as below:
    BB::System: Phone:hone telephone;
    phone.initiateCellularCall("519-555-0100");
    or by using the context of the invocation.

    Enforcement I do should be used in the profile of work all the other features work as in compose email but phone app does not get invoked in the job profile, he works on the personal profile of the phone.

    Do I need special permissions on the side of BES server or something, since it is deployed on the BES Server?

    Hello

    With the delimitation of the staff and work of perimeters in BlackBerry 10 applications will be referred to as 'personal' applications and be inaccessible from the perimeter of the company; one such application is the phone. Therefore impossible to initiate calls from the perimeter of work using the configurations currently provided in BlackBerry 10 today.

Maybe you are looking for