Exit a j2me app

Hi i have a timeout function my my midlet class that if it reached a certain point when nothing happens, i display an alert screen thats set to forever and execute a command this.notifyDestroyed();
when i do this the alert screen doesnt disapear and the application still runs

Hi i still cannot manage to exit the program.
here is my timer class
public void timer()
        time = new Thread()
            public void run()
                int seconds = 0;
                counting = true;
                //do animation
                while(counting)
                    try
                        time.sleep(1000);
                        seconds++;
                        if(seconds == 60)
                            time = null;
                            counting = false;
                             timeout();
                            break;
                    catch(Exception e)
                        e.printStackTrace();
    }the alert screen
public void timeout()
time = null;
ok1 = new Command("Ok", Command.OK, 1);
Alert alert = new Alert("error");
alert.setString("The game has timed out, please restart the game by clicking OK");
alert.addCommand(ok1);
alert.setCommandListener(this);
alert.setTimeout(alert.FOREVER);
Display.getDisplay(this).setCurrent(alert);
and here is the OK command that suppose to exit the application:
if(c == ok1)
            Display.getDisplay(this).setCurrent(null);
            this.destroyApp( true );
            notifyDestroyed();
            //System.exit(0);
        }

Similar Messages

  • My first gen. iPad exits out of apps and safari at random times when I am trying to use them. So I basically can't do anything on it. Is there some way I can fix this?

    Crashing apps. What do I do to fix it?
    My first gen. iPad exits out of apps and safari at random times when I am trying to use them. So I basically can't do anything on it. Is there some way I can fix this?

    I have the same problem.  Yahoo Sportacular aborts every time I try to open it.  It attempts to load and then the device goes right back to the home screen.  The problem started April 26 after I switched leagues from NHL to NBA. Closing all apps and Restarting doesn't solve solve the problem.
    All other apps on the iPad work fine.  IPad2, OS6.
    Any other suggestions?  I suppose I could delete the app from the iPad and try re-installing it

  • TS3274 My ipad has been lagging, it will exit out of apps and on safari will bring up pages that I searched awhile ago before bring up the current page. what could be the problem?

    My ipad mini has recently been exiting out of apps on its own. It has also been bring up old searches when I log into safari things I've searched months ago.  I have the latest update. I can't figure out why it's been doing this.

    Clear Safari, close all apps, and reboot your iPad.
    Go to Settings>Safari>Clear Cookies and Data.
    In order to close all of your apps, double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it. Close all apps this way.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • How to access loudspeaker in J2ME app

    How to access loudspeaker in J2ME app and know a status of a call which is initiated through app.

    so are you saying that pointerpressed doesnt work after setting Setfullscreen mode?

  • [jsr82] can a j2me app be a Bluetooth server and client role in parallel?

    I want to make my j2me app register a special service channel and listen to it, meanwhile, I also want to start a client to connect to other handset which has the same services. In Bluetooth protocol side, this is obviously OK, but in J2me is this design possible? some people said that in jsr82, the Bluetooth device is exclusive for J2me app, app cannot be both server role and client role at the same time. Can anybody give me a definite answer?

    No this design is not possible with JSR 82. Because when the device acts as a server it can't be used as a client as whenever you will run the client code the server mode will disappear.
    But what maximum you can do is when you need the client to run close the server and switch into the client mode but I think you don't need this solution.
    Shan!!!

  • Update J2ME Apps (Updating Existing jar with latest updates)

    Hi ,
    I am new to J2ME. I had created a jar(One J2ME App). I need to update the existing jar with some of my newly added & edited class file. I can do this for desktop apps "jar uf jar-file input-file(s)", there is an option to put all the updates in a batch file (.bat) and update the existing jar. I need same functionality need to be achieved in Mobile Apps (J2ME Jar). (Simply like, if i click a file(jar, exe, or etc) all the updates should go to the existing jar file). Kindly help me to find a way to solve this issue.

    Thanks for reply,
    So, if my jad application is installed in mobile, i don't want to reinstall it again, need update this installed jad itself, is it possible with this ?. Actually something like how Service Packs given by the windows(SP1, SP2..), Like that in Mobile i need to upgrade my jad application by giving my patch to it(additionally added classes).

  • Why does the iPhone randomly exit out of apps??

    Hello what should I do about my iPhone 4S randomly exiting out of apps? I've held the top and middle buttons at the same time many of times and its not helping! It's still occurring! Help!!!

    An app randomly exiting means that the app has "crashed".  You might have a bad app (try deleting it form your device and re-downloading it).  It might be an app bug which you just happen to be encountering.  It could also be a problem with your iPhone.  You could do a "restore as new" and re-instsall the apps and see if they have the same issues or not.  It they don't, then it was either a bad download, or corruption in your "profile".

  • What are the ways to download j2ME app to j2ME phones

    Hello Friends,
    What are the ways to download j2ME app to j2ME phones, is there any method that all phones supports.
    I am downloading app to different phone in different ways, i.e using infrared, bluethooth, cable (different cable for different phones), URL (WAP)... offff.....
    Can any one let me know is there any one way that we can download app to phone... i mean is WAP URL support on all phone?
    Thanks
    Kumar.M.R

    The following Java tip may help:
    How to install a J2ME aplication on a mobile device
    http://www.java-tips.org/content/view/617/73/

  • Parameters on a j2me app

    Hi, I must develop a general app to communicate with a PC, this app must be used by several custom programs on the devices. I want to know how can I call to a java app from another app inside a mobile device and send it parameters.
    For example:
    From an app I must call to this program and send a variable amount of parameters so my j2me app can analize those parameters and send the data to the pc.
    analizing the data and comunicating with the pc is the easy part, but I have no clue on how to initialize the j2me app.
    In a PC you can do it qith the java or javaw commands.

    mmmmm, what?
    I am new to j2me, can you please explain it better.
    I have also made all the connection system to comunicate from the mobile to the PC and also have made the plugin based working system on my PC, now it really need to achieve on this to continue the project.

  • Are there any ways to package a J2ME app and let people view via computer?

    Are there anyways to packaged a J2ME app with the emulator?
    So that when people click on a bat file, that emulator will run along with the J2Me app?
    I saw this in the jbuilder console
    C:\WTK21\bin\emulator.exe -classpath "C:\MyApp\classes;" -XdeviceefaultColorPhone -Xdescriptor:"C:\MyApp\jad-temp\MyApp.jad"
    I belive it can be done?
    Please advise. Thanks

    What? An .exe? What is this? Do you know that you are coding in Java? Especially in J2ME? What do you want with a windows executable on your mobile phone?
    Once more:
    1) pack your project and generate the jad/jar files. This contains your code, the app you wrote.
    2) To run this, you need a phone or an emulator. (like you need windows to run an exe). So either you transfer these to a phone and run it from there or use the emulator that comes with the WTK or SunONE or whatever. And for running on an emulator, you can write a .bat for starting. Of course, you can write a .exe but it will do nothing else than calling the emulator with its parameters.
    Thats the Java principle btw:
    Bytecode (i.e. jad/jar in mobile environment)
    Java VirtualMachine (i.e. an emulator)
    OS (i.e. Win32)
    hth
    Kay

  • Can`t exit from the app corner mode in windows phone 10 technical preview at Nokia Lumia 520

    After upgrading to windows phone 10, I just face several bugs as expected, including screen unlock bug. I just try app corner feature on my phone. That`s led to a big mistake. I can`t exit from the app corner mode. While pressing the power off
    button and swap right, nothing happens. (In lock screen, it doesn`t show that swap right to exist. I think this problem also related to locks screen bug.  Even I try  to remove the battery. But, still I struck at app corner. Please
    help me come out this problem!!!
    Thanks in advance
    Mohamed Usman
    www.neotech4u.weebly.com

    Very very disappointed. Sorry about windows phone. I have argued quit a lot with friends. Trying to convince them that WP are extremely good and nice to work with. Unfortunately they keep telling me about the poor apps of WP. Unfortunately I can now start seeing the problem. Guess what, I wasconsidering of buying my father a WP. Guess what. I will probably stick to android. Badly played about that. Farewell. Disappointed 7.8 WP customer from Athens Greece.

  • Networked J2ME app hanging on send

    Hello there,
    So, I have a network aware j2me app that does a LOT of talking with a server in order to stay synched (yes, we realise lots of network traffic could be expensive for the consumer -- this app is being developed at the request of a carrier..heh).
    I, like many people here, was having LOTS of problems using POST. The errors were frequent and insanely difficult to track down. So, at someone's suggestion, I switched to GET (pass the packet data as a parameter in the query string). Performance is definatly better...but still not perfect..
    The problem I have now is very strange: After several minutes (anywhere from 2 to 5) of sending data packets to the server without incident, my sending thread will just freeze. Its still running, only no data is able to get sent to the server. This, of course, basically breaks my application.
    If I leave it running for several minutes, eventually I will get an "IOException: malformed response message" error, and then it will start sending again. Generally speaking, though, once this first freeze has occured, subsequent freezes are frequent.
    Has anyone experienced a problem like this before? I would have sworn I read a thread about this issue on a J2ME forum recently, but I can't, for the life of me, track it down again.
    If anyone has any ideas, I would be greatly appreciative.
    Many thanks, in advance,
    Ben Mattes.

    Me again.
    Ok, let me try to be a little more precise in what exactly I need. :)
    What is happening is that after several minutes of succesfull data transfer between client/server, a connection is being opened to the server succesfully, but data isn't getting transfered. Sometimes it takes up to 5 minutes for this data (a string less then 100 bytes long) to get transfered. Something is obviously getting hung up somewhere.
    Checking deeper we can confirm that there is indeed a hang in the connection object. However, we don't know what to do about it.
    The device we are working with has a maximum of 2 concurrent connections allowed, and we currently use both already (one for incoming, one for outgoing). We can't just open another connection and wait for the stalled connection to timeout.
    Is there any way we can force a connection to just STOP whatever its doing? It is not our method that is caught in a loop. Its most definatly something in the connection class. Will setting the connection in question to null then forcing a garbage collection cause it to stop whatever it is doing, allowing us to open a new connection and re-attempt the data transfer with the server?
    Not sure if this makes it a little more clear.
    Any help would be greatly appreciated.
    -Ben Mattes

  • How to use pointerPressed() in j2me app running in Windows mobile

    Hi
    Can someone tell me how to add pointerPressed() support in command area(the bottom rectangle enclosiing the keyboard icon) in windows mobile.
    Our J2ME app is running in windows mobile(5.0) however even after setting fullscreen mode to true,pointerPressed() does not work on the bottom area of the screen where the keyboard icon is.It however works on all other screen region.
    Thanks in advance.
    Abhishek

    so are you saying that pointerpressed doesnt work after setting Setfullscreen mode?

  • My itouch wont exit from an app and won't turn off.

    My itouch wont exit from an app and won't turn off. I've tried assistive touch. I can do stuff on the app but can not leave the app. PLEASE HELP!

    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                 
      iOS: How to back up

  • Wireless connection speed for J2ME app on Palm VIIx device

    I have just developed a J2ME app on Palm VIIx device. Everything works exactly as what I have designed, except that the wireless communication to send and receive infomation is painfully slow. It takes about 1 min. to send and receive 300 charactors on the Palm VIIx device. As for comparisons, it only takes few seconds on the simulator(connected through LAN/WAN) for the same application. And for other defaultly installed non-J2ME wireless applications on the Palm VIIx device, e.x., ABC News, Amazon, etc., it also only takes few seconds to retrieve 500~600 characters.
    Does anybody know why the J2ME wireless communication on Palm VIIx device is so slow? Any solutions?
    My code is like in the following:
    private String getWirelessQueryResult(String urlStr) {
    StringBuffer sb = new StringBuffer();
    InputStream is = null;
    StreamConnection c = null;
    try {
    c = (StreamConnection)connector.open
    (urlStr,Connector.READ_WRITE);
    is = c.openInputStream();
    int ch;
    while((ch = is.read()) != -1) {
    sb.append((char)ch);
    } catch (IOException e) { sb = new StringBuffer("error"); }
    finally {
    try
    if(is != null) { is.close(); }
    if(c != null) { c.close();}
    catch (IOException e) {}
    return sb.toString();

    You've done nothing wrong with your code that I can see. I have run into the same problem on both the Kyocera and the Samsung palm OS phones. If you take the same code you have written here and put it on a motorola phone you will see a huge difference.
    I can only suspect it has to do with the single threaded nature of the palm OS itself. Luck.

Maybe you are looking for

  • Import 16 bit tiff files in premiere pro cs5 ?

    When i try to import a 16 bit tiff sequence I get an error message "The video bit depth of this file is unsupported.". I could not find how to set bit depth in project, however I understand from the help files that 16 bit workflow is supported. What

  • Setting Markers in Log & Transfer window

    Hi All Anyone know a trick/plug-in that will enable me to set markers while I am setting my In's and Out's in the Log & Transfer Window before I 'Add Clip to Queue'? I would like to set markers indicating the interesting moments in the footage. cheer

  • Tell me if my idea is wrong

    Hi ; I'm work in simple web application and MySQL DB, and create managed-bean that hold data from DB (session and request) and I need some ideas my first idea : I make class and all method in this class public static that method check if the array em

  • Actual resolution of Keynote?

    I'm new to Keynote and haven't been able to find any info about the resolution, i.e. dpi, of background, images, etc IN the program. I see that I can choose 800X600 or 1024X768 as dimensions, but are all its parts 72dpi? Since I can't find a way to c

  • Variable to compare does nto work

    hi: when i execute the following in oracle i get invalid column name errir message. int idIn = 100; ResultSet rst = stmt.executeQuery("SELECT * FROM customer WHERE customer_id = idIn"); But, it works if i use 'WHERE customer_id = 100' the program wor