×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    auto-start at background

    Hi,

    I need my application to autostart, and yet stay in the background until needed.

    Problem is that although I'm sending the application to the background at construction time, it then gets events that send it to the foreground.

    My auto-start is currently implemented by an auxiliary process, which runs the application process by calling the RProcess API (Create and Resume).

    I know the most elegant solution would be to create an exe to do the logic, and GUI which only runs on demand, but for the coming version I simply don't have the time to do the separation. Also, when the GUI is needed, I need to be able to launch it really quickly, so even if I had the time, I'd probably consider having the GUI switched on all the time (although in the background).

    Any suggestions?

    Thanks,
    Nadav

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: auto-start at background

    Quote Originally Posted by nadav70 View Post
    Problem is that although I'm sending the application to the background at construction time, it then gets events that send it to the foreground.
    Well, what kind of events and why don't you ignore them when the app is auto-started? How to detect how the application was started is described in a couple of articles in the wiki.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Re: auto-start at background

    Quote Originally Posted by ltomuta View Post
    Well, what kind of events and why don't you ignore them when the app is auto-started? How to detect how the application was started is described in a couple of articles in the wiki.
    I don't have problem finding out how my application was started (I use argument list for that).

    The event is the foreground event. Is there a way to ignore it?

    What happens in my code is follows:
    1. Auto-start starts my auxiliary startup process.
    2. My startup process uses RProcess API to start my GUI application
    3. OS starts my GUI application, and the ConstructL is called
    4. In ConstructL I schedule a send to background within 0 seconds
    5. This seems to cause a race condition between my background request and the OS-initiated foreground event.


    Only thing I can think of is keep sending the GUI to the background within the HandleForegroundEventL, for couple of seconds after launch. This seems very ugly to me, though (and it may create bad user experience).

    Thanks again,
    Nadav

Similar Threads

  1. Replies: 3
    Last Post: 2008-04-04, 08:01
  2. UNI-11 : Correct auto start behavior
    By mayudada in forum Symbian
    Replies: 2
    Last Post: 2007-12-28, 04:48
  3. Auto Start app at device boot Up
    By Tasneem Rangwala in forum Symbian
    Replies: 9
    Last Post: 2007-10-12, 16:09
  4. Replies: 2
    Last Post: 2004-08-25, 04:50
  5. Replies: 2
    Last Post: 2004-04-01, 09:17

Posting Permissions

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