J2ME, How to minimize a program ?

Discussion in 'Java' started by Boki, Apr 14, 2005.

  1. Boki

    Boki Guest

    Hi All,

    How to minimize a program ? ( not End a program )

    When a J2ME program is running, I hope my user can exit the program for a
    while to do other funtions of phone and back to my program when she/he want.

    Do we have this command support?

    Thank you very much!

    Best regards,
    Boki.
     
    Boki, Apr 14, 2005
    #1
    1. Advertising

  2. Boki

    Anton Spaans Guest

    "Boki" <> wrote in message
    news:d3ldh5$krs$...
    > Hi All,
    >
    > How to minimize a program ? ( not End a program )
    >
    > When a J2ME program is running, I hope my user can exit the program for a
    > while to do other funtions of phone and back to my program when she/he

    want.
    >
    > Do we have this command support?
    >
    > Thank you very much!
    >
    > Best regards,
    > Boki.
    >
    >

    Hi Boki,

    It is not possible to specifically allow for that.
    It depends on your phone and the resources available to your phone and your
    phone will decide what to do.

    E.g. Suppose your J2ME program is running. A phone-call comes in. Based upon
    the amount of resources available (e.g. how much memory left, etc) your
    phone may decide to close your J2ME program all-together or it may decide to
    put your J2ME program into the background.

    For example, Series 60 phones have the ability to switch between tasks
    (holding down the menu-button for more than 1 sec). Using this button, the
    user can switch between (J2ME) processes.

    -- Anton.
     
    Anton Spaans, Apr 14, 2005
    #2
    1. Advertising

  3. Boki

    Frank Guest

    Anton Spaans wrote:
    > "Boki" <> wrote in message
    > news:d3ldh5$krs$...
    >
    >>Hi All,
    >>
    >> How to minimize a program ? ( not End a program )
    >>
    >>When a J2ME program is running, I hope my user can exit the program for a
    >>while to do other funtions of phone and back to my program when she/he

    >
    > want.
    >
    >> Do we have this command support?
    >>
    >>Thank you very much!
    >>
    >>Best regards,
    >>Boki.

    >
    > Hi Boki,
    >
    > It is not possible to specifically allow for that.
    > It depends on your phone and the resources available to your phone and your
    > phone will decide what to do.
    >
    > E.g. Suppose your J2ME program is running. A phone-call comes in. Based upon
    > the amount of resources available (e.g. how much memory left, etc) your
    > phone may decide to close your J2ME program all-together or it may decide to
    > put your J2ME program into the background.


    I'd think MIDlet.notifyPaused() was ment for exactly this kind of
    situation? Granted, it may not be implemented and working as intended on
    all systems, but it's certainly in the API.
    There's also the pauseApp() callback, which lets you know when your app
    is suspended from external events.
     
    Frank, Apr 14, 2005
    #3
  4. Boki

    Boki Guest

    Hi
    Thank you so much for the information I didn't know.


    But, for Sony Ericsson cells, we can press back button ( like the
    symbol of inverse Enter ) to exit ( not destroy ) program.

    For SmartPhone - P910i, we can run other funtion very easily ( we don't
    have to implement it )

    I found a cheat method that could do this.

    public Form f;
    .....
    .....
    // Do not new a Form for f

    display.setCurrent(f); // minimum program :p


    // I don't know why, the compiler pass it, and we can find it is work on
    cells.Best regards,Boki."Anton Spaans" <aspaans at(noSPAM) smarttime
    dot(noSPAM) com> ¼¶¼g©ó¶l¥ó·s»D:...
    >
    > "Boki" <> wrote in message
    > news:d3ldh5$krs$...
    >> Hi All,
    >>
    >> How to minimize a program ? ( not End a program )
    >>
    >> When a J2ME program is running, I hope my user can exit the program for a
    >> while to do other funtions of phone and back to my program when she/he

    > want.
    >>
    >> Do we have this command support?
    >>
    >> Thank you very much!
    >>
    >> Best regards,
    >> Boki.
    >>
    >>

    > Hi Boki,
    >
    > It is not possible to specifically allow for that.
    > It depends on your phone and the resources available to your phone and
    > your
    > phone will decide what to do.
    >
    > E.g. Suppose your J2ME program is running. A phone-call comes in. Based
    > upon
    > the amount of resources available (e.g. how much memory left, etc) your
    > phone may decide to close your J2ME program all-together or it may decide
    > to
    > put your J2ME program into the background.
    >
    > For example, Series 60 phones have the ability to switch between tasks
    > (holding down the menu-button for more than 1 sec). Using this button, the
    > user can switch between (J2ME) processes.
    >
    > -- Anton.
    >
    >
     
    Boki, Apr 14, 2005
    #4
  5. Boki

    Guest

    Re: J2ME, How to minimize a program ?

    Thank you so much for the information I didn't know.


    But, for Sony Ericsson cells, we can press back button ( like the
    symbol of inverse Enter ) to exit ( not destroy ) program.

    For SmartPhone - P910i, we can run other funtion very easily ( we don't
    have to implement it )

    I found a cheat method that could do this.

    public Form f;
    .....
    .....
    // Do not new a Form for f

    display.setCurrent(f); // minimum program :p


    // I don't know why, the compiler pass it, and we can find it is work
    on cell.
     
    , Apr 14, 2005
    #5
  6. Boki wrote:
    > How to minimize a program ? ( not End a program )


    MIDlet.notifyPaused().

    --
    Darryl L. Pierce <>
    Visit my homepage: http://mcpierce.multiply.com
    "By doubting we come to inquiry, through inquiry truth." - Peter Abelard
     
    Darryl Pierce, Apr 16, 2005
    #6
  7. Anton Spaans wrote:
    > It is not possible to specifically allow for that.


    Of course it is! It's in the specification: MIDlet.notifyPaused() does
    exactly what he's asking.

    --
    Darryl L. Pierce <>
    Visit my homepage: http://mcpierce.multiply.com
    "By doubting we come to inquiry, through inquiry truth." - Peter Abelard
     
    Darryl Pierce, Apr 16, 2005
    #7
  8. Boki

    Anton Spaans Guest

    notifyPaused() not necessarily called....

    "Darryl Pierce" <> wrote in message
    news:E468e.87404$...
    > Anton Spaans wrote:
    > > It is not possible to specifically allow for that.

    >
    > Of course it is! It's in the specification: MIDlet.notifyPaused() does
    > exactly what he's asking.


    But what if your phone does not call this 'notifyPaused()' callback method?
    Instead, your phone may be very low on resources and decides to close your
    J2ME program all together (e.g. when an incoming call must be handled)

    I agree; *if* your midlet's notifyPaused() is called, then you can handle
    some code to clean up some resources to go into 'minimized' state.

    >
    > --
    > Darryl L. Pierce <>
    > Visit my homepage: http://mcpierce.multiply.com
    > "By doubting we come to inquiry, through inquiry truth." - Peter Abelard
     
    Anton Spaans, Apr 18, 2005
    #8
  9. Re: notifyPaused() not necessarily called....

    Anton Spaans wrote:
    >>>It is not possible to specifically allow for that.

    >>
    >>Of course it is! It's in the specification: MIDlet.notifyPaused() does
    >>exactly what he's asking.

    >
    > But what if your phone does not call this 'notifyPaused()' callback method?


    Then the handset's not up to the specification, since it's supposed to
    do just that.

    > Instead, your phone may be very low on resources and decides to close your
    > J2ME program all together (e.g. when an incoming call must be handled)


    Then in that case the phone must call MIDlet.destroyApp(boolean).

    > I agree; *if* your midlet's notifyPaused() is called,


    It's MIDlet.pauseApp(). MIDlet.notifyPaused() is how the application
    tells the handset that it wants to be paused.

    --
    Darryl L. Pierce <>
    Visit my homepage: http://mcpierce.multiply.com
    "By doubting we come to inquiry, through inquiry truth." - Peter Abelard
     
    Darryl Pierce, Apr 22, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. robin
    Replies:
    0
    Views:
    867
    robin
    Jul 20, 2003
  2. Boldra
    Replies:
    0
    Views:
    1,290
    Boldra
    Dec 3, 2003
  3. Erik  Bethke
    Replies:
    1
    Views:
    1,892
    Erik Bethke
    Feb 8, 2005
  4. Frank Niessink
    Replies:
    3
    Views:
    676
    Frank Niessink
    Feb 28, 2006
  5. Justin C
    Replies:
    5
    Views:
    205
    johannes falcone
    Aug 16, 2013
Loading...

Share This Page