×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    40

    Autostart Problem

    Hi All,

    I have a recognizer which launches an application in background.
    When I installed the application first time on 3650 , it worked fine. But when I installed it again it gave System Error while installing the application. Now i am not able to start the application itself.

    I checked that UIDs of recognizer are same that of old and new one.

    What can be the Problem?

    Can anybody shade some focus on it?

    TIA,

    Utk

  2. #2
    Registered User
    Join Date
    Oct 2004
    Posts
    1
    Hi Utk,

    I have a recognizer written for series 60, sx1 phone which autostarts my application. However it starts the application in the foreground and I would like to start the application in the background.
    can you please tell me what you did to start the application in the background?

    Thanks
    Amogh

  3. #3
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359
    Probably your recognizer is still running while you try to overwrite it with its new version . You should remove it first.

    Also you should try the autostart plugin available on Symbian's site.

  4. #4
    Registered User
    Join Date
    Apr 2004
    Posts
    40
    Hi amoghc,

    Here is a code to launch application in background.

    //////////////////////////

    CApaCommandLine* cmdLine = CApaCommandLine :: NewLC();
    cmdLine->SetLibraryNameL( app_file_path ); // path of your app file to launch

    cmdLine->SetCommandL( EApaCommandBackground );

    RApaLsSession ls;
    User::LeaveIfError( ls.Connect() );
    CleanupClosePushL( ls );

    User::LeaveIfError( ls.StartApp(*cmdLine) );
    CleanupStack::PopAndDestroy(2); // ls , cmdLine

    //////////////////////////

    Happy coding,
    Utk

  5. #5
    jp4symbian
    Guest

    Exclamation Re: Autostart Problem

    Hi Utk,
    I am having the same problem. I want my application to be sent to background after being auto started from a recognizer.

    And I am using the following code to launch the application from the recognizer:

    /////////////////////////////////////////////////////////////////////
    _LIT(KAppName,"Test.app");
    TBuf<100> appName(KAppName);
    CApaCommandLine * cmd=CApaCommandLine::NewL();
    cmd->SetLibraryNameL(appName);
    cmd->SetCommandL(EApaCommandBackground);
    EikDll::StartAppL(*cmd);
    /////////////////////////////////////////////////////////////////////

    You are using :
    RApaLsSession ls;
    User::LeaveIfError( ls.Connect() );
    CleanupClosePushL( ls );
    User::LeaveIfError( ls.StartApp(*cmdLine) );
    CleanupStack::PopAndDestroy(2); // ls , cmdLine

    But the SDK Documentation for "StartApp" says that:

    StartApp()
    TInt StartApp(const CApaCommandLine& aCommandLine);
    Description
    Starts an application defined by the specified command line information.

    This is only recommended for non document based applications.

    This should NOT be used for view based applications.


    Do you think then it is appropriate to use this API for a view-based application, since most of the applications are view-based?



    Quote Originally Posted by Utk
    Hi amoghc,

    Here is a code to launch application in background.

    Happy coding,
    Utk

  6. #6
    jp4symbian
    Guest

    Re: Autostart Problem

    I have solved my problem.

    The code posted in my previous post works very well and serves the purpose.

Posting Permissions

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