×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    55

    Exit on back key when app is in back ground

    Hi All,
    My application does not exit when it is in back ground and i press the back key of mobile it gives do you want to exit if i say yes then it doesn't exit,and this is must for symbian signing.
    actually in AppUi i m doing
    case EEikCmdExit:
    ExternalizeSettingsDataL();
    iIndicatorIcon->SetIndicatorIconL();
    ApplicationUtils::SendToBackground(KUidXfoneApp);
    if(!(iAppEngine->iEnable))
    iAppEngine->Start();
    break;

    case EAknSoftkeyExit:
    ExternalizeSettingsDataL();
    Exit();
    break;


    So plz help me.
    Last edited by Anurag Bansal; 2008-09-18 at 04:28.

  2. #2
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: Exit on back key when app is in back ground

    Hi Anurag,

    What do you mean by the "back key"? Could you elaborate?
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

  3. #3
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Exit on back key when app is in back ground

    Hello,

    I do not follow 100% what are you asking for... There is no need to exit the application for the Symbian Sign if there is good reason to let it run in the background. But there should be also the possibility in the menu to really exit and stop the application (asking user via dialog - as you suggest).

    Regards,
    STeN

  4. #4
    Registered User
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043

    Re: Exit on back key when app is in back ground

    Hi,
    Did u try to debug your application as to where the control comes when you are pressing "back" key( which I understand is the soft key you are talking about) because if the control is coming to case EEikCmdExit then obivously your application won't close(according to your implementation). I would suggest you to put up breakpoint in your switch case and check which case is getting invoked.
    As Stenlink suggested the application not exiting and going to background should not be a problem for Symbian signing.
    Maximus
    S60 Developer
    Impossible is nothing

  5. #5
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    55

    Re: Exit on back key when app is in back ground

    Done

    I have implemented the following code

    void CMyAppAppUi::HandleWsEventL(const TWsEvent &aEvent,
    CCoeControl *aDestination)
    {
    // LogFile::Print("Inside HandleWsEventL =%d\n\r",aEvent.Type());
    if (aEvent.Type() == 1000)
    {
    // LogFile::Print("Inside HandleWsEventL =%d\n\r",aEvent.Key()->iCode);
    if(aEvent.Key()->iCode == 1)
    {
    LogFile::Print("Inside KAknUidValueEndKeyCloseEvent\n\r");
    Exit();
    }
    }

    else
    {
    CAknViewAppUi::HandleWsEventL(aEvent, aDestination);
    }
    }

  6. #6
    Registered User
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043

    Re: Exit on back key when app is in back ground

    Hi,
    but is the control coming to the swich case of ProcessCommandL() in your AppUi?? I guess not because your are directly calling Exit() from your HandleWsEventL(). Is that the behaviour you are getting?? I would suggest dont directly call Exit() from there also call CAknViewAppUi::HandleWsEventL(aEvent, aDestination); from there and put logs in your ProcessCommandL() to check whether you are getting control there or not.
    Maximus
    S60 Developer
    Impossible is nothing

  7. #7
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    55

    Re: Exit on back key when app is in back ground

    Hi yogpan if i do this is there any problem at the time of signing?

  8. #8
    Registered User
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043

    Re: Exit on back key when app is in back ground

    Hi Anurag,
    It depends if your application is like server application which needs to run continously in the background then as Stenlink has already pointed out you should have a strong reson for it and the user should have the provision to be able to close the application from menu then you can still get symbian sign.
    Maximus
    S60 Developer
    Impossible is nothing

  9. #9
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    55

    Re: Exit on back key when app is in back ground

    o.k Thanx Yogpan

Similar Threads

  1. Replies: 12
    Last Post: 2008-08-19, 18:29
  2. symbian signed testing problem.
    By anglina in forum Symbian
    Replies: 0
    Last Post: 2007-02-01, 10:15
  3. Phone restarting on pressing Exit key.
    By techietintu in forum Symbian
    Replies: 8
    Last Post: 2007-01-08, 04:35
  4. 7650 - go back, close my app not closing the container app
    By geran in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-12-05, 10:00
  5. 7650 - go back, close my app not closing the container app
    By geran in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2002-12-05, 09:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×