J2ME: Do not close app when phone closed..

Posted on 2006-05-03
Last Modified: 2008-02-01
          WHAT I WANT: When my application is running....I want to come back to the same state when I open the phone after closing for sometime.

          WHAT I DID: When my application is running------If I close the phone using ExternalDisplayCanvas and display a text in the screen (phone: Motorola i870).....and open the phone, application is not closed..I want exactly like this but I had to display something on the screen to do this..which I do not want.
          But When I do not use ExternalDisplayCanvas and close the will be closed...

          WHAT I AM DOING RIGHT NOW: I am trying to do with pushRegistry but it became too the pushRegistry only way to do it??Am I in the right track?

Any help or insight would be appreciated..

Question by:velosumdev
    LVL 3

    Accepted Solution


     U have to use the Java suspension state. Suspend java and resume wneh u come next time.  Using this it is possible.

    LVL 1

    Assisted Solution


    Hi velosumdev !

    I am not sure if I understood your question correctly, but if you switch off the phone completely, it means the application have been closed completely as well. In that case, to reopen it again automatically, you have to use the PushRegistryAlarm to set the alarm ( and also to set some paramters to know your current status for the next open )in the closeApp() Abstract class in the MIDlet, in that case it may :

    1- for SonnyEricsson, when you switch on again, it will prompt you to start the application ( you have to permit manually - if your application is not signed ) , in that case you can do whatever you want with the above set parameters

    2- for Nokias , the setAlarm will be lost, you have to reopen the application manually

    Not sure what is the behaviour of motorola

    I wish that helps

    LVL 1

    Assisted Solution


    wasnt this helpful ? or I didnt understand your question ?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Today sees the launch of a new case study, focusing on BYOD technologies we have been working with for some time now.  But with the advent of 802.11ac wireless technologies and the story behind our landmark developments, we would like to share this …
    This subject  of securing wireless devices conjures up visions of your PC or mobile phone connecting to the Internet through some hotspot at Starbucks. But it is so much more than that. Let’s look at the facts: devices#sthash.eoFY7dic.
    This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now