×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    5

    how to call a midlet from another midlet

    Hi i am new to J2ME can anybody please tell me that how do i call a midlet from another midlet within the same package. I am using netbeans and donot know how to do it. Please provide the code , currently i am trying to call it like this but it dont works


    NewClass object = new NewClass();

    object.startApp();


    Thanks
    Kumar

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: how to call a midlet from another midlet

    Welcome to Forum Nokia!!

    Just don't do it. One application, one MIDlet. You can't have multiple MIDlet objects in the same application.

    Graham.

  3. #3
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    264

    Re: how to call a midlet from another midlet

    Quote Originally Posted by grahamhughes View Post
    Welcome to Forum Nokia!!

    Just don't do it. One application, one MIDlet. You can't have multiple MIDlet objects in the same application.

    Graham.
    HI Graham
    My application has only 1 midlet.
    I want to call methods of midlet from my class. But i am not able to do so. The class is in the same package.
    i get following error "java.lang.SecurityException: Application not authorized to access the restricted API
    "



    Plz help anything
    Thanks & Regards
    Gaurav Gupta

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: how to call a midlet from another midlet

    I'm guessing you are trying to create a second instance of your MIDlet class, with a "new" expression. You must not do this. Use the existing instance (the one you can refer to as "this" in the startApp() method).

    Graham.

  5. #5
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: how to call a midlet from another midlet

    startApp() will be called by the Application Mangement System and you need to call that by yourself.This is one of the method of the MIDlet life cycle.

    Why do you want to call a MIDlet from the other MIDlet?
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  6. #6
    Registered User
    Join Date
    Nov 2010
    Posts
    1

    Re: how to call a midlet from another midlet

    grahamhughes..i have a problem wth my project..can u help me??

  7. #7
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: how to call a midlet from another midlet

    Welcome to Forum Nokia!

    If you start a new thread in the appropriate part of the forum, and tell us in detail what your problem is, I'm sure everyone will do their best to help you.

    Graham.

Similar Threads

  1. Call a midlet from another midlet
    By elyse86 in forum Mobile Java General
    Replies: 3
    Last Post: 2010-05-18, 11:56
  2. call a Visual Midlet from AnotherVisual Midlet
    By dhvijaeypv in forum Mobile Java General
    Replies: 1
    Last Post: 2010-04-20, 14:12
  3. MIDlet to call another MIDlet?
    By s1459193 in forum Mobile Java General
    Replies: 3
    Last Post: 2009-07-16, 11:30
  4. To call midlet from midlet
    By manish88 in forum Mobile Java General
    Replies: 3
    Last Post: 2009-02-28, 19:49
  5. call a Midlet from Midlet
    By vishwas_dot_h in forum Mobile Java General
    Replies: 1
    Last Post: 2005-06-10, 03:41

Posting Permissions

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