×

Discussion Board

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

    Post How to invoke one app from another (AMS)

    I need to implement a feature wherein a parent j2me app can invoke another app that exists on the deveice.
    Once I exit the new app that was invoked, I need to continue running the parent app.

    The closest I have seen such behaviour is with Opera Mini, where we can download a jar from the internet and run it. Opera Mini downloads the file and permits the new jar file to be run and itself exits silently.

    Even if I could do this much - just invoke the new app (and the parent could exit) it would be very helpful.

    Eg.
    Parent app displays a list of application names.
    User selects one from the list.
    The parent app exits.
    The app selected from the list starts.
    (if possible: When app 2 exits, the parent resumes)


    I do not want to put all the children apps as midlets in the suite. I need them to be independent jars.

    Is there an approach possible, maybe with the AMS.
    If you are aware of any such approach could you direct me to some sort of tutorial or help?
    I would appreciate your views towards a solution.

    Thank you,
    Sylvan

  2. #2
    Registered User
    Join Date
    Aug 2010
    Posts
    8

    Re: How to invoke one app from another (AMS)

    I am aware that Java Tips says that:

    "...one MIDletSuite cannot launch another MIDletSuite. That's because they do not share name spaces. Since the CLDC+MIDP does not have a security manager (too big and complex for small devices), the MIDP expert group felt it more prudent to limit the interaction of downloaded applications to those that are packaged together by the provider...."

    I am looking for a workaround.

    Thanks,
    Sylvan

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

    Re: How to invoke one app from another (AMS)

    Your findings says what exactly the situation is. AFAIK there is no workaround available so far. Just for checking your need you can check the J2ME Content Handler API, JSR 211.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Registered User
    Join Date
    Aug 2010
    Posts
    8

    Re: How to invoke one app from another (AMS)

    Thank you. I will look that up.

    I was also thinking maybe I could use socket connections with Push Registry.
    Where the child apps are registered on particular ports.
    The parent app needs to connect to one of the ports, thus waking the child app that is waiting on a port.
    Unsure whether I'd be able to do something like that.

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

    Thumbs up Re: How to invoke one app from another (AMS)

    Quote Originally Posted by sylvanlobo View Post
    I was also thinking maybe I could use socket connections with Push Registry.
    Where the child apps are registered on particular ports.
    The parent app needs to connect to one of the ports, thus waking the child app that is waiting on a port.
    Unsure whether I'd be able to do something like that.
    If you wanna go in details about the push registry then you probably can go through this link
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: How to invoke one app from another (AMS)

    Quote Originally Posted by sylvanlobo View Post
    Thank you. I will look that up.

    I was also thinking maybe I could use socket connections with Push Registry.
    Where the child apps are registered on particular ports.
    The parent app needs to connect to one of the ports, thus waking the child app that is waiting on a port.
    Unsure whether I'd be able to do something like that.
    If the apps are in the same midletsuite -- then you can even try to use Push Registry on Alarm to push start another child app from the same midlet suite.
    no need to use push registry on socket.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  7. #7
    Registered User
    Join Date
    Aug 2010
    Posts
    8

    Re: How to invoke one app from another (AMS)

    @Amitabh
    They are in two different suites.

    I tried the Socket approach. But I get a address-already-in-use IOException at the parent (when I try to just open the socket).

    @Raj
    I tried the CHAPI too, but far as I could manage, I could invoke another midlet only if it were in the same suite.


    One crazy workaround I can think of is to make a remote server send a push sms to invoke the child (no way!)

    Thanks,
    Sylvan

Similar Threads

  1. Replies: 1
    Last Post: 2010-01-05, 16:11
  2. Replies: 1
    Last Post: 2009-11-19, 09:36
  3. Replies: 11
    Last Post: 2009-09-20, 20:25
  4. Replies: 2
    Last Post: 2009-06-08, 11:12
  5. Replies: 1
    Last Post: 2006-12-16, 00:08

Posting Permissions

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