I have set up a J2ME environment for developing Nokia Series 40 MIDlets:
NDS for j2me 3.0
I have imported the MediaPlayer sample (src and res directories) from Nokia into a newly created Eclipse Project
In Eclipse, you can set user attributes that can be aquired at run-time by the MIDlet class. It is in
Tools->Nokia Developer suite for J2ME->New Application Package...->User Attibutes tab.
I understand that these attributes will make it into the jad file. You can access them in the MIDlet class by getAppProperty(....).
But this doesn't work with the user attributes
Let's say, I have defined:
(key=Test, value=Hello, that is)
I have checked it, it really got into the jad file. I have copied another jad file from a Nokia sample project (MediaSampler). I have hand-edited the jad file. Nothing worked.
However, using a pre-defined attribute, e.g. MIDlet-Name worked fine. Here is a code snippet:
// the MIDlet class constructor
// All user attributes don't work
String AMR_Audio_Clip = getAppProperty("AMR-Audio-Clip");
String WAV_Audio_Clip = getAppProperty("WAV-Audio-Clip");
String MIDI_Audio_Clip = getAppProperty("MIDI-Audio-Clip");
// Pre-Defined attribute works fine
String Test = getAppProperty("MIDlet-Name");
Stepping through this code in the debugger, all strings remain null, except for Test.
Why doesn't this work with user attributes?
Any help would be great