×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    55

    Handling red key

    Hi,

    I have implemented VOIP call in my application. For ending the call, i used red key to end the call. I m able to capture the red key event and end the call with the code below.

    //constructor
    RWindowGroup& groupWin = CCoeEnv::Static()->RootWin();
    iEndKey1 = groupWin.CaptureKeyUpAndDowns( EStdKeyNo, 0, 0 );
    iEndKey2 = groupWin.CaptureKey( EKeyNo, 0, 0 );

    //destructor
    RWindowGroup& groupWin = CCoeEnv::Static()->RootWin();
    groupWin.CancelCaptureKeyUpAndDowns( iEndKey1 );
    groupWin.CancelCaptureKey( iEndKey2 );

    //HandleWsEvent
    TInt key = aEvent.Key()->iScanCode;
    if(EStdKeyNo == key && aEvent.Type() == EEventKeyDown)
    {
    //Do something to handle end key pressed
    }
    else
    {
    CAknAppUi::HandleWsEventL(aEvent,aDestination);
    }

    Now i also have an option in which i can send my application to background. Now when my application is in background, i want to release the red key event to the device. How can i do this. can anyone plz help me.

    Thanks& regards,
    ramanathan

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Handling red key

    The red key capture for your app makes sense only when you have a current call either incoming/active/dialled, in those cases you capture the red key, in all other cases you should cancel capturing the key.

    Also while your app is in background for which you would get callback in HandleForegroundEventL with a EFalse, there also if you dont have an active call you should cancel the key capturing.
    Cheers,
    Mayank

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    3

    Re: Handling red key

    Hi... How to send my app to background when red key is pressed? In my E65 app is kill when red key is pressed.

    Thanks

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Handling red key

    Quote Originally Posted by mbarbiero@hotmail.com View Post
    Hi... How to send my app to background when red key is pressed? In my E65 app is kill when red key is pressed.

    Thanks


    To get the RED key event you will have to capture it in your code, code for capturing the RED key is mentioned in this post itself.
    After capturing the RED key you can give your specific behaviour.
    Regards,
    Shafali

  5. #5
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Handling red key

    Quote Originally Posted by mbarbiero@hotmail.com View Post
    Hi... How to send my app to background when red key is pressed? In my E65 app is kill when red key is pressed.
    Check following links:
    - How to handle End Call Key in 3rd edition?
    - How to send the Application to Background

  6. #6
    Regular Contributor
    Join Date
    May 2008
    Posts
    120

    Re: Handling red key

    Quote Originally Posted by A.A.M. View Post
    Using the code in the link , must i handle all other keys?
    i planted the code in MyAppUi() , and other keys are non-responsive ...

    Thanx!!!
    One small step for me , one giant leap for mankind :)

Similar Threads

  1. Replies: 106
    Last Post: 2009-05-11, 05:53
  2. The RED key handling on S60 MR
    By stone_cheng in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-06-11, 10:25
  3. phone app & long press red key
    By morost in forum Symbian
    Replies: 2
    Last Post: 2007-09-21, 07:51

Posting Permissions

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