This page was last modified 10:39, 28 November 2007.
Correct versioning in About of MIDlet
From Forum Nokia Wiki
AFAIK, many junior J2ME developers often make typical mistake while developing MIDlets, like hardcoding application version in About dialog. This mistake may confuse an end user if version in About dialog differs from version in JAD file.
To prevent such errors I recommend do not hardcode application version in About dialog. Instead you can use following code:
import javax.microedition.midlet.MIDlet; public class MyMIDlet extends MIDlet { public String getAppVersion() { return this.getAppProperty("MIDlet-Version"); } }
In code above method getAppVersion() returns actual application version, taken from JAD file (or JAR file, if first one is absent). Using this technique version specified in About dialog will never differs from actual application version.
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Midlet permissions issue | barbeNoire | Mobile Java General | 10 | 2006-12-04 10:07 |
| MIDlet communication | rel1986 | Mobile Java General | 2 | 2006-06-03 16:48 |
| problem in getting IEMI using nokia 2630 j2me | kmsoomro | Mobile Java General | 6 | 2008-07-30 15:56 |
| Urgent*****How to invoke second MIDlet from first??**** | amit.das1980 | Mobile Java General | 4 | 2006-02-01 14:39 |
| SMS "portless" messages | janezz | Mobile Java Networking & Messaging & Security | 2 | 2003-07-01 04:56 |
