How to show a Canvas screen before exit the midlet

If i want to show a canvas screen after user click exit to quit the midlet (after call the notifyDestroy()), any way to do that? thanks.

Hi,
you have to catch the exit event in the commandAction method and there you will display a YES/No form:
create your YES/NO form:
Form yesNoForm = new Form("Exit?");
yesNoForm.append("You are about to exit the application!Exit?")
yesNoForm.addCommand(new Command("Yes",Command.OK,1));
yesNoForm.addCommand(new Command("Cancel",Command.CANCEL,0));
yesNoForm.setCommandListener(this);
!!!Note you can write your own command classes extended from the Command and add those to yesNoForm, that way you will have a better control on the application.
commandAction(Command c, Displayable d){
if (c.getCommandType() == Command.EXIT) {
display.setCurrent(yesNoForm);
if(c.getCommandType() == Command.OK){
destroyApp(true);
notifyDestroyed();
if(c.getCommandType() == Command.CANCEL){
display.setCurrent(mainForm);
This should work.

Similar Messages

  • Hello, my iphone 5s fell, thereafter i tried taking a picture, the camera app just shows a black screen and hangs, the front camera works on other apps but the rear camera is not working, all other apps work perfectly well, how do i resolve this

    Hello, my iphone 5s fell, thereafter i tried taking a picture, the camera app just shows a black screen and hangs, the front camera works on other apps (such as facetime and skype) but the rear camera is not working, all other apps work perfectly well, how do i resolve this

    Double tap Home button and delete Camera app from multitask-list.
    Do a
    Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data
    If problem persist, make an appointment with genius bar for evaluation.

  • After i update my ipad 2(wifi 3g/64g) to ios 5.0.1..everything works ok except 3g  can not connect to internet.. in the top of my ipad screen it show 3g sign..before update the 3g was working ok

    after i update my ipad 2(wifi+3g/64g) to ios 5.0.1..everything works ok except 3g  can not connect to internet.. in the top of my ipad screen it show 3g sign..before update the 3g was working ok

    i am at SAUDI ARABIA and the Service Provider is (STC) i found that the APN setting has to change from (jawalnet.com.sa ) to (afaqwireless.com).. NOW 3G OK

  • How can I take a screen shot on the iPad Air and keep the resolution at 2048 x 1536. For some reason when I'm in an app it reduces the resolution

    How can I take a screen shot on the iPad Air and keep the resolution at 2048 x 1536. For some reason when I'm in an app it reduces the resolution

    Tatanka11 wrote:
    I'm new to Mac,...
    Then...  You may find these Links of Interest and Value...
    Show me how to set up my Mac.
    http://www.apple.com/support/mac101/
    http://www.apple.com/support/switch101/     Switching from PC
    http://www.apple.com/findouthow/mac/
    Enjoy your Mac...

  • How to mute and lock screen rotation at the same time? Loved this feature in iOS 5.

    How to mute and lock screen rotation at the same time? Loved this feature in iOS 5.

    You cannot do two different simultaneous VISA writes over a serial bus. There is a single rx line on the pc's com port and a single rx line on the instrument. You only hope is if the instrument allows you to chain commands and the reception of the carriage return triggers the instrument to implement both at the same time. Maybe you can send CTS01 and CTS02 separated by a space or comma. The manual should tell you if that's possible or maybe you need to ask the manufacturer.

  • MY COMPUTER ONLY SHOWS A BLACK SCREEN, WITH ONLY THE POP UP SHOWING .....VIEW AND TRACK YOUR DOWNLOADS

    MY COMPUTER ONLY SHOWS A BLACK SCREEN, WITH ONLY THE POP UP SHOWING .....VIEW AND TRACK YOUR DOWNLOADS

    Hi,
    First plaese unplug any external device (except the mouse and keyboard), then hold on the power button, perform a cold reboot, what is the result?
    If doesn't work, please press F8 (or other button, depend on your PC model) boot your compute into recovery console.
    You can restore your system to a previous point or perform a startup repair, please refer to the following link:
    What to do if Windows won't start correctly
    http://windows.microsoft.com/en-in/windows-vista/what-to-do-if-windows-wont-start-correctly
    Yolanda Zhu
    TechNet Community Support

  • Report execute time nd how many records will be returned before hitting the "run" option?

    Post Author: Prasad15
    CA Forum: WebIntelligence Reporting
    Is there any way to know how long the report executes and how many records will be returned before hitting the "run" option?
    Regards
    Prasad

    To know if the report is going to return more than 10,000 records, you first have to run the query with a 'select count(1) from ... where ...' (with the same from and where clauses as you normal query). Since this takes about the same time as runnng your report, I wonder if you really gain anything (although formatting may take some time too).
    You may simplify the select count(1) query by omitting all the lookup tables that are only needed for formatting. That way your query may run a lot faster. You can put this in your after parameter form trigger.

  • Hi, I am trying to download IOS7 to my ipad. The programme has locked at the 'Choose a Wif-Fi network' page, a box says 'joining other network' but the page is greyed out and can't move from it.  How can I clear this screen and finish the download. Thanks

    Hi, I am trying to download IOS7 (not sure if it's 1 or 2) to my ipad. The programme has locked at the 'Choose a Wif-Fi network' page, a box says 'joining other network' but the page is greyed out and can't move from it.  How can I clear this screen and finish the download. Thanks

    Hello Den53,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430?viewlocale=en_US
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider.
    After the device has turned off, press and hold the Sleep/Wake button until the Apple logo appears.
    Best of luck,
    Mario

  • HT5422 How to get an better screen-update? The view on the remote Mac is nearly static.

    How to get an better screen-update? The view on the remote Mac is nearly static.

    You can try reducing the bit depth of the screen image  via the slider in the upper-right of the Control window. If that doesn't help, you may just not have a sufficiently fast network connection to correctly handle the data transfer necessary. This is often the case if you're connecting across the Internet. What is your network speed between the administration system and the client?
    Regards.

  • How can I do a screen capture on the iPad?

    how do you do a screen capture on the iPad...

    Press Home and Power at the same time.  You'll hear a shutter sound.  It should now be on your camera roll. 

  • How to show thumbnails of an event on the same screen?

    In the iPhoto tutorial, it shows that when you start in the All Events screen and you double-click on the Event you want to open, what you get is a screen full of thumbnails from that Event. But when I double-click on the Event I want, it just brings me to an enlarged version of that single image, and I have to use left and right arrows to get to other images in that Event. I even went to iPhoto-Preferences-Events and under the option for "Double-click Event" I chose "Shows Event photos" but still all I get is the single image. So, how do I get all the thumbnails of one Event like in the tutorial? Thanks. Franklin

    Look to the lower right hand corner of our iPhoto window - the right hand side of the toolbar - the slider there is all the way to the right - move it toward the left until the desired number of thumbnails show.
    Larry Nebel

  • How to show a variable screen when clicking on direct link of report in ,when that report is used as target in RRI alsoRRI

    Hi All,
    I have created RRI between two reports and the type is web template/WAD.
    My requirement is to show the variable screen of target report when clicked on direct link and it should not show the var. screen if it goes from jump/go to.
    while currently I can not see var. screen on both the places and when switching the var. scree. display on in web template , it shows the screen at both the places.
    Please suggest.
    Thanks,
    Anu

    Hi Anu,
    "And when I am using another var. in assignment details which is ready for input (in both the queries), its not helping."
    Did you try using such a variable? What kind of a problem do you face? I am sorry I am still trying to understand your problem. I am just saying that which variable you use is not important for the first query. Only in the second query, add a variable with ready for input (I am not sure why the other doesn't work, I just tried and it gave an error, that's why I suggest this) and in RRI connection make the assignment with this variable. Please try this and let me know the result.

  • After sorting photos into albums, the albums disappeared on me. I dragged and dropped the photos and went back to check that they were in place before exiting the program. When I went back, the folder was there but no albums. Help!

    Working on an IMac - with IPhoto v.9.6 
    This is my first experience with IPhoto... trying to move files from a PC over to a Mac.
    I don't have a ton of photos but I created about 6 albums - standard albums - and dragged and dropped individual photos into each of the albums. I named each of the albums as well so I would know what was in each. After i was finished, I created a folder called 2014 and moved each of the albums into that folder. Before moving ANY of the albums, I opened each of them up to make sure that all the photos I wanted in each were indeed there - and since there were some errors on my part, I deleted any duplicates first. SO, I KNOW the photos were actually in each of the albums BEFORE i moved them into the 2014 folder.
    My intention was to then delete the photo files in my document file but once I got there I thought I would go back and double check the IPhoto file just to make sure... and the pictures were NOT in the albums where I had placed them... is there a need to save this before you move on and if so, to where and how? I was under the impression that once files were moved to albums, they remain there.
    The photos are still in the photo library but unsorted now again... I cannot even open the 2014 folder at this point.
    Thanks for any help!!

    Was back on IPhoto this morning. The folder did not open at all so I deleted it. Beside Albums, nothing showed at all. It was like I had done no work at all except to import my photo folder. Nothing was in my trash bin either.
    I started again and created one album at a time. I dragged and dropped photos into the album and exited out of IPhoto, opened up other programs and then returned to IPhoto to see if the album was still there and it was this time. I created a second album and did the same thing. This time, for some reason, the albums seem to be staying in place. I am not doing anything differently than last time. After creating three albums, I created a folder called 2014 and dragged and dropped the three albums into the folder and exited IPhoto. They were still there when I returned - YEAH! It seems to be working - for now! I am keeping my fingers crossed that my photos are not going to disappear but I am not going to delete my photo folder from my files just in case!
    Thanks for the suggestions but this may just have been a funny glitch... not sure what happened. I didn't change anything or do anything differently this time except that I am doing it one album at a time and exiting the program between creating each of them and coming back to check... very strange.

  • How can read BOM component date before save the production order??

    Hi Experts,
    In our company, we need to develop a program to read the BOM component data of the production order
    before we save the production order.
    That for example ,when we create and release a production order , before we save the production
    order,we want a porgram to read the BOM component data. If some component data can meet our
    requriement (may be if there is material requirement quantity>100 EA),then the system will pop up a
    small dialog box to remind us.
    There is user exit PPCO0007 and PPCO0007.But it seems they only can read the head data of the
    production order before we save the production order. And the BOM component data of the production
    order are saved in the RESB(Reservation Table).So if we do not save the production order,all the BOM
    component data are not saved in the RESB table.
    So how can slove the problem??
    How can read component date before save the production order??
    Are there any other user exit we can use???

    Hi Just wanted to check am I right that you are trying to check if you have enough Materials Available before you release or Save the order right ? if this is your business objective then when you create order you have material availability tab which checks and gives error if shortage is there. Please let me know if is this wht you asking for ?

  • How to clear the cookie in midlet before quite the midlet?anyone?pls

    i am fresh in J2ME . Can anyone teach me on how to clear the cookie in midlet before i quit from it?
    I designed an application that require login and use session(cookie) management, i need to clear the cookie before or during i quit the midlet, so that the user will need to login again after quit from midlet. Can anyone pls assist me? i need it urgently!

    I designed an application that require login and use session(cookie) management,How did you implement the cookies. This isn't a built-in part of J2ME. You have to implement it yourself (saving the cookie and resending it in future requests), so only you can know how to delete it.
    shmoove

Maybe you are looking for

  • Disp+work is stoping after upgrade

    HI Basis Guru's after upgrade of  SAP 4.7 to ECC6.0 system is not coming up. Disp+work is stoping after few seconds. error message shows ora -942 error, trc file: "dev_w0", trc level: 1, release: "700" ACTIVE TRACE LEVEL           1 ACTIVE TRACE COMP

  • Unable to clear DOS window after running JAR

    Hi guys, I am trying to write a batch file to launch my JAR, this is because the JAR is on a networked drive, and each user can have a .bat file on their desktop to run it. Anyway, when the .bat file is run, the DOS console pops up behind it but I do

  • Dashboard: 3rd party widgets won't load

    odd problem I can't figure out. for some reason, Dashboard stopped loading third party widgets. they will appear in the widget bar and in the widget manager, but double-clicking on them simply closes the dashboard view without loading the widget. det

  • Configuring DDE for Adobe Reader printto.

    Hello, I am trying to configure DDE for Adobe Reader to use printto. Does anyone know what parameters and messages I should use to configure this? Regards, Ramon

  • Modal dialog in Premiere Pro (using AE SDK)

    Hello all, I have a plugin that does some long, intensive processing inside a single render call. I show my own progress bar in a modal dialog while this happens. This is working fine in After Effects, but it's causing a crash in Premiere Pro. I get