Devices

Does my handset support API xyz?

For a list of supported Java APIs in a specific Nokia device, see the Device Specifications on Forum Nokia. For a list of supported Java APIs and the platform release level in a specific S60 device of other manufacturers, see the Device Specification in question on the S60 platform Web site.

For most of the newer APIs it is also possible to query the phone during execution time if a certain API exists. This is done using System.getProperty() method call. To check the correct query string to be used with the method (for example microedition.pim.version for PIM API), please see the Implementation Notes of the specific API.

My phone does not seem to have support for API xyz. Can it be added on the phone?

No, but if the API can be implemented on using the existing Java APIs on the phone, you can include the required class files in your MIDlet. This of course makes your MIDlet bigger and if you need to use the same classes in another MIDlet, you need to include the classes in that MIDlet too, as the classes of another MIDlet are not accessible from other MIDlets. Also note that in most cases this is not possible as usually the new API requires access to the system functions of the phone.

Can I read and write files on my mobile phone using a MIDlet?

Yes, if your phone supports the FileConnection API, which is an optional package of JSR-75. For more information on the API, see File access.

Can I access the address book /to-do list/calendar on my phone?

Yes, if your phone supports the PIM API, which is an optional package of JSR-75. For more information on the API, see PIM Event handling.

My MIDlet seems to be too big for my phone. How can I make my JAR files smaller?

Obfuscation replaces the class and method names with short (1 character) names, which has the side effect of making the class files smaller. Originally obfuscation was intended to be a tool to make the reverse engineering of the MIDlet harder. One example of such tools is Proguard.

If your application uses resource files (images, audio, or video), make sure they are optimized for the small devices (suitable bit depth, image resolution, audio bit rate, and so on.)

You can also shave some bytes off your JAR-file by making the folder names really short.