How to handle the case end good app?

Hello

I'm creating an application for BB Storm2 5.0 device. I have a function to maintain a custom in app menu item native contacts, and clicking from there, brings to my screen of the application. It works very well.

Problem occurs in the following steps:

Steps to follow:

1. start my native element menu contacts application, launch my app successfully screen.

2. then if I press the red button, launching the device home screen.

3 then run on the native Contacts application once again, throw my request directly instead of native contacts.

Because in step 1, I launched my application screen in the menu contacts native. Because it does not have closed earlier, lance on native contacts spear my request.

Anyone explain how can I handle this situation?

Thank you.

What amrishodiq said, this isn't 100% correct.  Let me correct that, then explain what you see:

You can add the ApplicationMenuItems without even starting your Application, by doing this in the treatment of hand (.).  If your application is present or not is irrelevant.  In fact, if you add them to the start of your application, you can get several added entries, must be careful about this.

What amrishodiq said about the red button and the usual methods of closing an Application is correct.  If you really want to exit your Application, is to call System.exit (.).  This happens automatically if you use the screen and you close the last screen in the stack to display.

That said, you're doing something completely different here.

You run in a Menu of Application element.  This menu item runs your code, but it is actually run by the Contact Application.  That's why, when press the red button and then relaunch the application contact, you view your screen.  If you had an icon for your Application and you have clicked on that right now, you will see a different screen.

In this case, if your screen called System.exit (.), he was closing the Contacts Application.

The problem of the listeners and ApplicationMenuItems running in the Application they are related is something that comes up quite often on this forum.  You really need move on to your own application and process the contact in there.  There are complications with it, make it seem easier to do what you're doing, that is just run your screens under enforcement Contacts.  However, I would recommend that you look at putting in a global events in the context of switch for your application, I think it's a better long-term solution.

Tags: BlackBerry Developers

Similar Questions

  • How to handle the case of zero insert line?

    11.2.0.2, I want to insert into a table and you want to handle the case where the zero line is inserted. I use the following code and hope an exception is caught and let me have the chance to do something
    set serveroutput on
    begin
    insert into his2051 select * from his2051  where today not in ( select distinct today from his2051 );
     EXCEPTION
        WHEN NO_DATA_FOUND THEN
            DBMS_OUTPUT.PUT_LINE('NO_DATA_FOUND exception ' );       
        WHEN OTHERS THEN
            DBMS_OUTPUT.PUT_LINE('OTHERS exception ' );       
    end;
    The block runs OK, but not seen release. How to handle the case of insertion of line 0?

    This will do what you want:

    set serveroutput on
    begin
    insert into his2051 select * from his2051  where today not in ( select distinct today from his2051 );
     if SQL%ROWCOUNT = 0 THEN
            DBMS_OUTPUT.PUT_LINE('%rowcount must be  [' || SQL%ROWCOUNT || '].' );
            DBMS_OUTPUT.PUT_LINE('NO_DATA_FOUND - but won't cause an exception ' );
     END IF;
     EXCEPTION
        WHEN OTHERS THEN
            DBMS_OUTPUT.PUT_LINE('OTHERS exception ' );
    end;
    
  • How to remove the case of Tecra A3X

    Hello

    Could someone tell me how to get the case apart on my laptop?
    I took all the screws and it still won't fall apart.

    The problem is that following machine does not start.
    I removed the hard drive and it works fine in another machine, so im thinking that it might be the on-board battery?

    Mike
    Any answer welcome

    Hello

    Why do you think battery BIOS (RTC) failure?
    You get an error like "verification system. Then press F1? "

    If you do not receive this error message your RTC battery is ok!

    I think it is a very bad idea to disassemble the laptop, if you don't know what the problem is and how to do it!
    There is a high risk that you would harm other parts of the laptop.
    I think you should ask the ASP in your country to control the laptop!

    Good bye

  • How to open the case or take the panels on a desktop HP A6202

    How to open the case or take the panels on a desktop HP A6202

    Just a manual for the love of God or an image. Now I searched the Net for an hour - no luck

    See this guide HP titled "opening the box" for instructions on how to open the case. Be aware that there are several "HP a6202" computers and your may be different than what I have listed. Please provide the full name of the HP model and/or the product name of the computer in question during a request for assistance.

  • How to disable the AppStore offers updated app that does not exist on the ipod touch 5g ios 9 and Reset counter app

    Regularly I receive notifications of updated Brainiacs Sudoku which I had deleted Ipod Touch 5 g a long time ago.  I can't disable the app update counter until I have download the update.  So, how to disable the AppStore offers updated app that does not exist on the ipod touch 5g ios 9 and Reset counter of the application once and for all?

    Try to hide this purchase

    Hide and show purchases iTunes or iBooks on your Mac or PC - Apple Support

  • How to open the case of a 15-g020ca hp?

    How to open the case of a 15-g020ca hp? I would like to replace the hard drive. The screws in the back seem to do nothing. It appears no release (or torque) seems them to have no effect on anything.

    Hello:

    Here is the link to the service manual for your laptop.

    http://h10032.www1.HP.com/CTG/manual/c04162986.PDF

    Read the applicable removal procedures section parts and replacement.

  • How to handle the onTriggered many ActionItem created dynamically

    Hi, I created the ActionItem dynamically using (loop)

    because data is from webservice

    How to handle the onTrigerred?

    If my code is like this:

    for (int i = 0; i)< alist.count();="">

    {

    My page page * = iRoot-->findChild ("SpecificObject");
    ActionItem * action = ActionItem::create () .title (aList [i] .name);

    bool res = QObject::connect (action, SIGNAL (triggered ()), this, SLOT (handleAction (())); what I'm confused because I don't know what action is triggered
    Q_ASSERT (res);
    Q_UNUSED (res);

    my page-> addAction (action, ActionBarPlacement:efault);

    }

    MyClass::handleAction() Sub

    {

    aFunction(); This parameter of function required of aList, said user.user aList [i]

    }

    Do I need to create handleAction() as well as added actionItem SLOT

    But I don't know how much action added because it is dynamic server

    Thank you

    There are a few options:

    Create a single location and connect all the signals. You can then call sender() into the slot to retrieve the object that sent the signal and go from there. You can also use a QSignalMap that maps each signal to a value and send this value to a single location. You can also use QSignalMap::sender() to get the sender object.

    I used the QSignalMap to do something similar for handling created dynamically successfully drop-down lists.

  • DV7 - 3067cl, how to open the case and clean the fan?

    Where to find a manual that shows you how to open the case to clean the fan?

    Thank you!

    Hello

    It is not easier to do component, but the procedure is detailed from on Page 94 of your & Maintenance Guide.

    Kind regards

    DP - K

  • How to open the case of a HP Pavilion a1657c

    The fan of my graphics (nVidia) is extremely low. I read on the internet that some blowing dust out of the inside of the Tower will help this problem. The thing is, I can't get the thing open dang. I removed a few screws, but there is a kind of ring in the way and I can't find out how to remove or bypass it. Is there anyone who knows full instructions on how to open the case?

    ThelielFK wrote: my (nVidia) graphics card fan is extremely low. I read on the internet that some blowing dust out of the inside of the Tower will help this problem. The thing is, I can't get the thing open dang. I removed a few screws, but there is a kind of ring in the way and I can't find out how to remove or bypass it. Is there anyone who knows full instructions on how to open the case?

    Hello ThelielFK, here is the link that has information on how to access the system by removing the side panel.

  • How to open the case of a slate 3400US 7 HD?

    I have a HP Slate HD 3400US and want to open the back to change the battery.
    There are actually several different models of 7 slate,
    and there are a few YouTube videos showing the dismantling,
    but they are NOT the 3400US, but a different model of 7 Slate.

    The 3400US has no screws on the outside and the back fits perfectly
    on the rest of the Tablet, then it not there no openings or cracks
    where I can stick a small screwdriver in.

    I don't want to raise at random inside because that would leave nicknames
    on the edge of the case, and I might end up inadvertently break.

    There must be a hidden somewhere tab that would free up the back.
    Does anyone know how to get inside?

    Thanks for any help.

    ...

    Hello

    The SECOND manual from the following link shows you how (#18 page):

    http://h10025.www1.HP.com/ewfrf/wc/manualCategory?cc=us&LC=en&product=6608634

    Good luck.

  • How to use the case and decode to extract data

    Hello gurus of PL/SQL,.

    I use Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64-bit Production version

    I have a table in the following form-
    drop table TT2;
    create table TT2(College, Class,gender,status,fees) as select
    'IITB','MBA','M','P',255600 from dual union all select
    'IITK','MTech','M','P',300000 from dual union all select
    'IITD','MBA','F','P',450000 from dual union all select
    'IITKH','MBA','F','P',350000 from dual union all select
    'IITC','MTech','F','P',420000 from dual union all select
    'IITB','MTech','M','P',185000 from dual union all select
    'IITC','MTech','M','P',235000 from dual union all select
    'IITD','MBA','F','F',175000 from dual union all select
    'IITM','MBA','M','F',257000 from dual union all select     
    'IITKH','MTech','F','P',335000 from dual union all select
    'IITD','MBA','F','P',540335 from dual union all select
    'IITC','MBA','F','F',125089 from dual union all select
    'IITD','MTech','M','P',290756 from dual union all select
    'IITM','MBA','M','P',200000 from dual union all select     
    'IITKH','MBA','F','F',534990 from dual union all select
    'IITD','MBA','F','P',221000 from dual ;
    certain conditions of extraction are as follows-

    MATTER OF STATE
    College of 'IITB' and status = 'P'-'good WestRegion '.
    College of 'IITC' and status = 'P'-'good SouthRegion '.
    College 'IITD' and 'IITK' and status = 'P' and type = 'F' - 'female NothRegion spent.
    College not in 'IITK' and status = 'F' - 'Ex Kanpur Failed'

    Results-
    Region Statnding     Fees
    WestRegion Passed     440460
    SouthRegion Passed     655000
    NothRegion Female Passed     1386335
    Ex Kanpur Failed     1092079
    Used SQL
    I use the following query that only make sure of the case, but it's not how I want to exit, if I try to use the case to breast to decode then how to work on it.
    SELECT (CASE WHEN College in ('IITB') and status='P' then sum(fees) else 0 end) WP,
    (case when College in ('IITC') and status='P' then sum(fees) else 0 end) SP,
    (case when College in ('IITD','IITK') and gender='F' and status='P' then sum(fees) else 0 end) NFP,
    (case when College in ('IITK') and status='F' then sum(fees) else 0 end) ExKF
    FROM 
    TT2
    GROUP BY College, Class,gender,status
    SELECT CASE WHEN College in ('IITB') and status='P'
                        then 'WestRegion Passed'
                when College in ('IITC') and status='P'
                        then 'SouthRegion Passed'
                when College in ('IITD','IITK') and gender='F' and status='P'
                        then 'NothRegion Female Passed'
                when College in ('IITK') and status='F'
                        then 'Ex Kanpur Failed'
                else 'Others' end region_standing,
                sum(fees) fees
    FROM TT2
    GROUP BY  CASE WHEN College in ('IITB') and status='P'
                        then 'WestRegion Passed'
                when College in ('IITC') and status='P'
                        then 'SouthRegion Passed'
                when College in ('IITD','IITK') and gender='F' and status='P'
                        then 'NothRegion Female Passed'
                when College in ('IITK') and status='F'
                        then 'Ex Kanpur Failed'
                else 'Others' end;
    
  • How to handle the no_data_found exception

    Hi all

    How to treat no_data_found exception in the procedure. I created a procedure with the cursor, the cursor loop and passing the value to the select statement (in the where clause). It works fine if the select statement returns one other wise he throws exception no_data_found, but I want to continue execution after the statement select returns no ecor. Please let me know how to handle this.


    Thank you and best regards,
    Rajasekhar

    Hello
    Assuming it's the syntax of your procedure:

    create or replace procedure XXXXXX as
    .
    .
    
    .
    .
    
    for cur_rec in 
    loop
    .
    .
    .
    
    .
    .
    .
    begin
    
    exception
    when no_data_found then
    
    end;
    .
    .
    
    .
    .
    end loop;
    .
    .
    end procedure;
    
  • Satellite M30X how to open the case?

    Can someone tell me step by step, how to do to open the suitcase so that I can work the power connector? I tried to open it, but I'm afraid to do sth. bad... I pulled all the bolts and started to open the case, but in the middle and at the back it is tied with the Platinum.

    Thank you

    Gemorra

    Hello

    First of all if you open Notepad, you will lose the warranty.
    Second, before you remove the covers it of necessary to remove all the devices option. (battery, hard drive, diving, etc.)
    It is important to remove the keyboard, as usually the screws under the keyboard protect the lower lid. In addition, the screws on the underside of the laptop must be removed.
    Well, that's all I know and if you want to know more details, so please ask to the ASP.

  • Toshiba Satellite 5200 - how to open the case?

    Hello

    I have a Toshiba portable computer Satellite 5200 903.
    Here's my problem:

    My laptop is getting very hot, even it is idling. This is because the cooler got very dirty over time. And if the case/CPU-fan runs all the time, but no air comes out there.
    Now, I would open the case and clean the cooler. But for some reason, it is not possible. I removed all the screws in the back, in the Bay of battery and the hard drive Bay, but it's not working. So I think there must be some other screws, maybe next to the powerbutton on the top under a blanket. But I don't know how to remove this cover, without breaking.
    Or maybe I'm totally wrong and missed something else.
    I hope someone can help me.

    And sorry for my bad English.

    Thanks in advance.

    schlady

    Hello

    in my expierence the screws on each NB arranged differently and I would disadvice you open the NB to yours!

    In my opinion, it will be the best way to the NB to a Toshiba Service partner. They have the kowledge how to open each specific model and change the FAN!

    This will cost money, but you can be sure that it works after the check-up!

    You can find the following Service partner
    https://EU.computers.Toshiba-Europe.com - Support & download and find an authorized Service partner!

    Goodbye, Sam

  • How to open the case of my Pavilion safely to clean inside?

    I have a Vista laptop computer model pavilion dv7/1130ae or 1130ea I want to open the case and clean the fan because ha strenge like a voice engine, so I need a video or a picture to show me how I can open and clean safely.

    Not really a WIndows Vista * software * question - more than one * must read your manual * question, huh?

    Frankly - buy some air canned, turn off the laptop, blow air in all the vents, you can find all possible directions.  In your case, I just think that this a more sensible choice.

Maybe you are looking for