4

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?

gnat
  • 6,213
  • 108
  • 53
  • 73
Pushpendra Kuntal
  • 6,118
  • 20
  • 69
  • 119

3 Answers3

4

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

Community
  • 1
  • 1
Telmo Pimentel Mota
  • 4,033
  • 16
  • 22
  • can I use Nokia-MIDlet-No-Exit: true in Jad file even i did not sign my MIDlet ? I am using Nokia device and writing above code which is suggested by you but it still now working. – Pushpendra Kuntal May 05 '12 at 13:55
  • Are you sore your device supports this key? Nokia site says that this is available since Symbian edition "S60 3rd Edition FP 2". – Telmo Pimentel Mota May 07 '12 at 11:23
  • The documentation says that Nokia-MIDlet-No-Exit is available for All domains, so you do not need to sign your MIDlet. Maybe the issue is wether the key is found: only in Jad; only in Jar/manifets; both. What have yout tried? – Telmo Pimentel Mota May 07 '12 at 11:35
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.

Yaroslav Mytkalyk
  • 16,950
  • 10
  • 72
  • 99
-1

It should not be Nokia-MIDlet-No-Exit:true but it should be
Nokia-MIDlet-no-exit: true
but for using this, you will first break Nokia security firewall by hacking your s40 device.

gnat
  • 6,213
  • 108
  • 53
  • 73
piyush
  • 1