问题
I am working in J2ME. I want that my MIDlet must run for infinite time. It must not close even I press any of key from my device.
Please help me what should I do for this?
回答1:
If you are using a Nokia handset you can add Nokia-MIDlet-No-Exit: true in Jad file: http://library.developer.nokia.com/index.jsp?topic=/Java_Developers_Library/GUID-C5D3E0F5-72B9-4EE7-8BA7-20DE4A538FB8.html
This other question is also about this minimizing a mobile application on exit button press
回答2:
I'm afraid that any device can close any MIDlet it runs. This can be done by the platform and you can't do anything about it in J2ME. The only solution is to make your custom firmware (or OS) by patching it.
回答3:
It should not be Nokia-MIDlet-No-Exit:true
but it should beNokia-MIDlet-no-exit: true
but for using this, you will first break Nokia security firewall by hacking your s40 device.
来源:https://stackoverflow.com/questions/10433330/midlet-must-not-closed-even-press-cut-button-of-device