Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    76

    Handle Call Button( Green key) and End Button (Red key)

    Dear All
    How can i use Call Button( Green key) and End Button (Red key) in my VOIP Application for making call and end call?

    Thanks in advance.

    Regards
    Javed

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,185

    Re: Handle Call Button( Green key) and End Button (Red key)

    You could search Wiki for capturing these keys, at least for Red key it has all the required information, and the Green is basically the same, just with different key value.

  3. #3
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    76

    Re: Handle Call Button( Green key) and End Button (Red key)

    Thanks symbianyucca

    I got the following code from wiki for End Call key.

    void CExampleAppUi::HandleWsEventL(const TWsEvent &aEvent,
    CCoeControl *aDestination)
    {
    if (aEvent.Type() == KAknUidValueEndKeyCloseEvent)
    {
    //Send your app to background or Exit from the application
    }
    }



    will any one kindly let me know what will be the value of aEvent.Type()=?? for Call Button(Green key).

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Handle Call Button( Green key) and End Button (Red key)

    Symbian OS v9.1 » Symbian OS reference » C++ component reference » Base E32 » TStdScanCode has all the key codes

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    76

    Re: Handle Call Button( Green key) and End Button (Red key)

    Hello skumar_rao

    I'm not exactly getting any matching related to Call Button(Green soft key) or End Call(Red Soft key) Value in your referred path.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Noida, India
    Posts
    150

    Re: Handle Call Button( Green key) and End Button (Red key)

    EStdKeyYes - green key(call key)

    EStdKeyNo - red key(end key)

  7. #7
    Registered User
    Join Date
    Feb 2008
    Posts
    16

    Re: Handle Call Button( Green key) and End Button (Red key)

    in my application
    i want to receive the call(green) button event and do something.
    please tell me how can i get this event in my application.

  8. #8
    Registered User
    Join Date
    Jul 2008
    Posts
    10

    Re: Handle Call Button( Green key) and End Button (Red key)

    You get Call key and Red/End key event in HandleKeyEventL() of AppUI

    TKeyResponse XXXXXXX::HandleKeyEventL(
    const TKeyEvent& aKeyEvent,
    TEventCode aType )
    {
    if(EStdKeyNo ||EStdKeyYes == aKeyEvent.iScanCode)
    {
    writte your own handle
    }
    return EKeyWasNotConsumed;
    }

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

    Re: Handle Call Button( Green key) and End Button (Red key)

    You can check the key in HandleKeyEventL()/OfferKeyEventL(). You need EKeyYes/EStdKeyYes for the green button.

  10. #10
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    Re: Handle Call Button( Green key) and End Button (Red key)

    Hello,

    did anyone experienced similar problem: Green button not handled at all
    (Nokia X6 fw 20.0.005 5th Symbian)

    Sometimes a key event (on green button) with code EKeyPhoneSend or EKeyYes is not handled at all. A virtual keyboard is triggered instead. In fact it is most frequent scenario. If debugging the code with break point set in HandleKeyEventL()/OfferKeyEventL() the problem is almost "fixed" - in debug mode with break points the problem is difficult to reproduce. but without the breakpoints the application does not react on green button. I did not exprienced similar problem on 3rd Fp1 or 3rd Fp2. Thank you for any pointer how to make a workaround.

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

    Re: Handle Call Button( Green key) and End Button (Red key)


  12. #12
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    Re: Handle Call Button( Green key) and End Button (Red key)

    Thank you... it seems to be robust solution. I have put this code in my appUi class:

    void CMyAppUi::HandleForegroundEventL (TBool aForeground)
    {
    if(aForeground)
    {
    #if defined(__SERIES60_50__) || defined(__S60_50__)
    SetKeyEventFlags(EDisableSendKeyShort|EDisableSendKeyLong);
    #endif
    }

    CAknAppUi::HandleForegroundEventL(aForeground);
    }

  13. #13
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,806

    Re: Handle Call Button( Green key) and End Button (Red key)

    If you do not need HandleForegroundEventL for other purposes, you can put the entire method (and its declaration in the .h) into #if.

  14. #14
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    Re: Handle Call Button( Green key) and End Button (Red key)

    Thank you Wizard for advice. There is such a performance penalty for execution of this function?

  15. #15
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,806

    Re: Handle Call Button( Green key) and End Button (Red key)

    I do not think that it could do anything perceivable, a few dozen bytes in the file, and 5-10 instructions in execution. Just if it does nothing, why to have it?

Similar Threads

  1. Replies: 8
    Last Post: 2009-01-24, 07:00
  2. Replies: 3
    Last Post: 2007-11-01, 15:05
  3. red key behaviour
    By davidmaxwaterman in forum Symbian
    Replies: 12
    Last Post: 2007-06-14, 07:37
  4. Can't SimulateKeyEvent() for End call button?
    By iti_jha in forum Symbian
    Replies: 2
    Last Post: 2006-12-01, 15:08
  5. handling the menu key and end call key on gameplay
    By yonan32 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-08-26, 10:23

Posting Permissions

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