×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    May 2006
    Location
    Milan, Italy
    Posts
    92

    phone app & long press red key

    what happens when is executed a long red key press in the main window ( phone app ) ?

    I ask that beacause I have a strange problem...

    I have an application that send some simulated key to phone application, but sometimes when I dial a call and ( for example when i stop the call ) the number remain on the screen and for eliminate it I use the red key or the right key.
    Well, if I eliminate this screen using this 2 methods my application can't anymore send simulated key to phone application...

    only if I make a long key press on red key the application is able the repeat the key simulation... I think because the red key restart or refresh some internal variables...

    also if i write manually a number and is visualized on the screen, the key simulated from my application are appended on this screen after the number writed manually..

    Any ideas ?
    ( for simulate keys I use the code finded in forum nokia and nokia wiki )

    thanks.

    Ste

  2. #2
    Registered User
    Join Date
    Sep 2007
    Posts
    17

    Re: phone app & long press red key

    Can you show how to simulate key? I am stopping in it. though i also read it from nokia wiki. But it not effected. can you tell me how to succeed it? or is the AppUi need some setting? Sorry for my English!

  3. #3
    Regular Contributor
    Join Date
    May 2006
    Location
    Milan, Italy
    Posts
    92

    Re: phone app & long press red key

    for simulate a key first is needed the phone application :

    Code:
    const TUid KPhoneAppUid = { 0x100058B3 };
    TApaTaskList tlist(CEikonEnv::Static()->WsSession());
    	
    TApaTask app(tlist.FindApp(KPhoneAppUid));
    		
    app.BringToForeground();
    then is possible to start key simulation that is maked sendind key to the phone application, for example the key 1 :

    Code:
    TKeyEvent key;
    key.iModifiers = 0;
    key.iRepeats = 0;
    key.iCode = 49;
    key.iScanCode = 49;
    app.SendKey(key);

    then you can start the call with the green key :

    Code:
    	
    TKeyEvent key;
    key.iModifiers = 0;
    key.iRepeats = 0;
    key.iCode = EKeyYes;
    key.iScanCode = EStdKeyNull;
    app.SendKey(key);
    with the red key you can reset the screen ( if some numbers are present ) :

    Code:
    	
    TKeyEvent key;
    key.iModifiers = 0;
    key.iRepeats = 0;
    key.iCode = EKeyNo;
    key.iScanCode = EStdKeyNull;
    app.SendKey(key);

    There is only one problem... ( it's writed in my first post ) , if you manually delete the box when the numbers appears the phone application don't take any key.. because is not able the create automatically this box...

    if you have this problem you can use this code :

    Code:
    TRawEvent lEventDown;
    TRawEvent lEventUp;
    lEventDown.Set(TRawEvent::EKeyDown, EStdKeyNo);
    lEventUp.Set(TRawEvent::EKeyUp, EStdKeyNo);
    	
    UserSvr::AddEvent(lEventDown);
    UserSvr::AddEvent(lEventUp);
    and you can repeat key simulation.


    P.S. I used key simulation for activate voip calls , for the standard calls I used CTelephony class...
    now I use a new approach beacuse I have a publisher ID ( for NetworkControl capability ) and I can use Phone Client Dial api when is possible to make gsm, voip or video calls and it's so much better !!!

Similar Threads

  1. Replies: 2
    Last Post: 2007-11-10, 13:19
  2. Key press long time..
    By mrshine in forum Symbian
    Replies: 3
    Last Post: 2007-03-23, 05:26
  3. App not get closed whn ---> press App key n select 'C'
    By saurbh_g in forum Symbian User Interface
    Replies: 5
    Last Post: 2006-05-11, 09:51
  4. Replies: 0
    Last Post: 2004-01-12, 17:47

Posting Permissions

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