Discussion Board

Results 1 to 5 of 5
  1. #1
    I'm trying to pass some command line arguments to a MIDlet, but I don't know where to look for the args within the MIDlet code (no obvious main(argv, argc) method). Any ideas? Is it possible?

  2. #2
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    You can use JAD file attributes to achive somewhat similar effect. You can use the MIDlet.getAppProperty() for retrieving those values.

    Hartti

  3. #3
    Thanks for the response!

    Is it possible to use that technique for arguments that change, though? I'd like to call the same MIDlet with an abitrary string (a URL, for example).

  4. #4
    Super Contributor peterblazejewicz's Avatar
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699
    hi clawer,
    you cannot modify jad on device, so you cannot change params,
    just idea, but probably you can register your midlet to listen for incoming data using push registry:
    http://developers.sun.com/techtopics...icles/pushreg/
    then any application on phone could invoke that midlet via local socket/tcp connection or via sms and pass new data to midlet,

    btw: how do you planned to pass args to midlet form other application?

    regards,
    Peter

  5. #5
    The idea is to start the MIDlet with some args so it can change its execution based on why it was called, etc (we have an idle screen S60 application that may need to launch the various applications on the phone, including some MIDlets). I have accomplished that idea through the use of an interim file, but it seems a bit "hacky". Thanks for your suggestion!

Similar Threads

  1. Passing runtime parameters to CLDC HI under Symbian 8.0
    By tal.elad in forum Mobile Java General
    Replies: 0
    Last Post: 2005-04-13, 11:10
  2. passing wap parameters to another asp file.
    By flash gordon in forum Mobile Web Site Development
    Replies: 4
    Last Post: 2004-08-25, 16:22
  3. Newbie Q: passing parameters to a wap page?
    By jhodgski in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2004-08-12, 16:58
  4. passing command line parameters?
    By prbhat in forum Symbian User Interface
    Replies: 2
    Last Post: 2004-04-23, 04:32
  5. Unable install midlets larger then 10kb into the 6310i
    By Arturas in forum Mobile Java General
    Replies: 1
    Last Post: 2002-12-03, 10:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved