Building from source
1. Checkout the most recent version from subverion:
svn co https://nfp-mini.svn.sourceforge.net/svnroot/nfp-mini/trunk nfp-mini
2. Create your build.properties file. You need to provide at least the path to
Sun Java Wireless Toolkit via wtk.home property.
For example:
wtk.home=/opt/wtk2.2/
Check out the beginning of build.xml file for more properties you can modify via build.properties
3. Run
ant
to run the application in emulator. Run
ant -p
for available targets
4. To be able to develop nfp-mini under eclipse you need to set WTHHOME classpath variable to the same value as wtk.home property.
You can do this via Window | Preferences, Java > Build Path > Classpath Variables
Porting to MIDP 1.0
Building of the midp 1.0 version is possible thanks to
Antenna's
preprocessor.
Limits of MIDP 1.0 which I had to take in account while developing nfp-min:
- No TextField.DECIMAL type. This field is used for entering temperatures in MIDP 2.0 version of nfp-mini. In MIDP 1.0 I could only use TextField.NUMERIC which disallows the use od dot (.), so temperatures need to be entered for e.g. 3660 instead of 36.6
- No full screen canvas. On MIDP 2.0 the graph screen take the whole display.
- No Choise.POPUP, which is used for mucus type selection. Instead Choise.EXCLUSIVE (which renders to a list of radio buttons) is used. This requires the user to scroll through all mucus types to get to other fields.
Bugs on Nokia 5410i:
- Calling DateField.getDate() sometimes returns the old value instead of the value entered by the user. I've found that this does not happen when after changing the date I switch focus to time field.
Porting to Nokia 6100
First of Nokia 6100 is a Nokia Series 40 phone, which all provide only MIDP version 1.0.
Nokia 6100 (and supposedly all Series 40 phones) additionally has these bugs:
- Overriding Form.setTitle(String) causes NullPointerException on object creation.
- Adding commands to Alert causes InvalidStateException
- Midlets without valid midlet icon defined in manifest are marked as invalid application.
Another problem was the 64kb jar size limit, but I managed to decrease it's size mainly using obfuscation.
Also FileConnection is not available so export/import of csv files had to be removed from the build (using Antenna defines).
This program is based on information from:
http://www.npr.prolife.pl/metoda_podwojnego_wskaznika.htm [in polish]