×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    2

    How to start a 3rd party application with parameters from a WRT Widget

    Hi All,

    I'm trying to start a 3rd party application (passing parameters) from a WRT Widget.
    I'm using the LaunchApp(critera) method to open the application. The criteria object has the CmdLine property that specifies a command line argument which is passed to the application being launched.
    All the examples I found on the forum don't use this property (or the property is an empty string).

    I tried to insert some parameters in the String passed to CmdLine, but the 3rd party app didn't receive the parameters as input (argc is equal to 1 and argv contains only the app .exe name). Instead if I launch the app via command line the parameters are correctly read.

    Does anyone know how the property should be formatted?

    Thank you in advance!

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    6

    Re: How to start a 3rd party application with parameters from a WRT Widget

    I found some infomation in <<Web_Developers_Library_v1_9_en>>. Hope this can help you.
    Format:
    Code:
      var opt = new Object();
      opt.Mode = "Standalone";
    
      var criteria = new Object();
      criteria.ApplicationID = appid;
      criteria.CmdLine = "";
      criteria.Option = opt;


    Code:
    Criteria for launching an application
    The criteria object specifies the application to launch.
    
    The criteria object has three main properties: ApplicationID, CmdLine, and Options. These are described in the following table. Properties enclosed in brackets are optional.
     
    criteria.ApplicationID
     Specifies a unique ID for the application binary (EXE or DLL).
    
    Use the GetList method to retrieve this ID.
     For example: "s60uid://0x101F857A"
     
    
    [criteria.CmdLine]
     Specifies a command line argument which is passed to the application being launched.
       
    [critia.Options]
     Object with the properties specified below.
     
    [critia.Options.Mode]
     Specifies whether the launched application is embedded within the application that called LaunchApp (chained) or whether the applications are independent of each other (standalone). For more information about chained and stand-along applications, see section AppManager.
    
    If this property is not specified, the default is "Standalone".
     Possible values:
    "Chained" - The application is embedded within the application that called LaunchApp.
    "Standalone" - The applications are independent of each other.
    
    [critia.Options.Position]
     Specifies whether a standalone application is launched in the background or foreground.
    This property is not valid if the Mode is "Chained" (embedded). Embedded applications are automatically launched in the foreground.
    If this property is not specified, the default is "Foreground".
     Possible values:
    "Background" - The standalone application is launched in the background.
    "Foreground" - The standalone application is launched in the foreground.
     
    [critia.Options.DocumentPath]
     Specifies the full path, including the file name, to the document to launch.
     For example: "C:\\Data\\abc.txt"

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

    Re: How to start a 3rd party application with parameters from a WRT Widget

    and basically mostly the parameters would be filenames, thus you should catch the parameters just as you would get the filename from the launched applciation side.

  4. #4
    Registered User
    Join Date
    Apr 2010
    Posts
    2

    Re: How to start a 3rd party application with parameters from a WRT Widget

    Thank you guys!

    My problem is that I'm trying to launch a 3rd party app from a Widget. I need to pass to the app 2 parameters (argc=3 and argv[]=[appname.exe, <1st parameter>, <2nd parameter>]). If I try to launch the app via ESHELL (the command line is C:\>appname.exe <1st parameter> <2nd parameter>) it works correctly.
    Now my question is:
    How I should format the criteria.CmdLine object to obtain the same result?

    Thank you very much!

Similar Threads

  1. 3rd party Java Application Cannot connect to internet (Nokia 2700 Classic)
    By sandeep.extreme in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2010-11-25, 12:31
  2. Replies: 1
    Last Post: 2009-12-20, 05:28
  3. Start a exe with a application start up
    By sandeepkumar03 in forum Symbian
    Replies: 8
    Last Post: 2009-02-05, 18:17
  4. application wont start in 3rd edition
    By microdot in forum Symbian
    Replies: 9
    Last Post: 2007-10-16, 10:56
  5. How to debug console application with CW3.1 and 3rd edition ?
    By 3rdparty in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2006-06-16, 13:54

Posting Permissions

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