×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    May 2009
    Posts
    201

    Auto run and auto hide when switched on phone

    I have developed one application which will auto run my application when i switched on phone and it should be auto hide immediately after open.

    i have used
    TApaTask myTask(iEikonEnv->WsSession());
    myTask.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
    myTask.SendToBackground();

    i have written this code at AppUi ConstructL().it is also working.
    My problem is that ---->
    When i want to start my application from menu definitely it will hide aromatically bcoz hide code is written in ConstructL().

    So what should i do to avoid this..
    how can i hide from my auto run application....

    any 1 can help
    thanks

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,956

    Re: Auto run and auto hide when switched on phone

    what you actually want to do , i didn't got it

  3. #3
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Auto run and auto hide when switched on phone

    Hi,

    Just take a flag when it first time hideen set the flag ture so the below line of your code will not get called
    like
    if(!flag)
    {
    TApaTask myTask(iEikonEnv->WsSession());
    myTask.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
    myTask.SendToBackground();
    flag = 1;
    }

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

    Re: Auto run and auto hide when switched on phone

    ideally you use the above code in AppUi::ProcessCommandParametersL( CApaCommandLine &aCommandLine ) For more info in wiki

Similar Threads

  1. Auto run Application when restart the mobile
    By sid_diu in forum Symbian
    Replies: 8
    Last Post: 2009-06-29, 06:45
  2. Nokia Gamer (GamR) - concept phone
    By tgm91 in forum General Development Questions
    Replies: 4
    Last Post: 2008-10-01, 21:34
  3. MIDlets auto run
    By jota13 in forum Mobile Java General
    Replies: 4
    Last Post: 2004-03-24, 17:53

Posting Permissions

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