Detect if the MIDlet is installing or running for the first time

153 Views Asked by At

I'm using J2ME SDK 3.0 and J2ME Polish and i would like to know if there's any event that is called when the user installs the application or when the MIDlet is running for the first time.

1

There are 1 best solutions below

0
On BEST ANSWER

There is no specific "first run" event. However, when the MIDlet starts, the system will invoke MIDlet.startApp(). You can implement your own "first run" detection by creating a RecordStore and saving some information in it. If the RecordStore does not exist, then it's first run. If it does, then you have run the MIDlet before.