×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    60

    Application can not bring to foreground when receive a call...

    I'm developing an application that manage call connecting and capturing media keys to bring the application to foreground when it is hide.(inc-Volume and dec-Volume)

    I wrote this lines to increase priority of my applicatin.
    Code:
            // set application as system application so that it will not be closed by system events
            CEikonEnv::Static()->SetSystem(result);
    
            // set application priority to foreground priority even if it goes to background
            CEikonEnv::Static()->WsSession().ComputeMode(RWsSession::EPriorityControlDisabled);
    This lines send my application to background:

    Code:
        TApaTask task(CEikonEnv::Static()->WsSession());
        task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
        task.SendToBackground();
    A user can click incVolume and decVolume sequentially. This lines bring the application to foreground:

    Code:
        TApaTask task(CEikonEnv::Static()->WsSession());
        task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
        task.BringToForeground();
    My Problem:
    I wrote same lines in EStatusRinging, but when my application goes to background and receive a call, I can't bring the application to foreground. After I reject call or answer call, the application shows.
    Do you have any idea to solve my problem?

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

    Re: Application can not bring to foreground when receive a call...

    you would actually neeed to use teh fucntions which with you can also define window priority, here's one thread that shows the idea:http://www.developer.nokia.com/Commu...-to-foreground

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    60

    Re: Application can not bring to foreground when receive a call...

    Thank you symbianyucca.

    My problem solved.

    add this line when application send to background:
    Code:
              CEikonEnv::Static()->RootWin().SetOrdinalPosition(0,ECoeWinPriorityNormal);
    and add this line when application bring to foreground:
    Code:
              CEikonEnv::Static()->RootWin().SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront);

Similar Threads

  1. About bring the application to foreground
    By charles_happysunny in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-10-01, 12:09
  2. Replies: 13
    Last Post: 2009-01-06, 09:38
  3. Replies: 6
    Last Post: 2006-11-30, 03:44
  4. Bring App to foreground on incoming call
    By ag24master in forum Symbian
    Replies: 3
    Last Post: 2006-06-30, 13:00
  5. Replies: 1
    Last Post: 2005-01-21, 08:04

Posting Permissions

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