Setting up the IDE with S60 5th Edition SDK

The Mobile Sensor API is not supported directly in the S60 5th Edition SDK. When using the S60 5th Edition SDK, you need to install the Mobile Sensor API Reference Implementation to compile MIDlets that use the Mobile Sensor API. Newer SDKs support the Mobile Sensor API directly.

The following instructions describe how to configure Eclipse and NetBeans to support the Mobile Sensor API. Before starting the configuration, make sure you have Eclipse or NetBeans correctly set up as described in section Setting up the development environment.

Note: The Mobile Sensor API Reference Implementation can only be used for compiling MIDlets. Testing MIDlets must be done with a real device.

Configuring Eclipse

To configure Eclipse to support the Mobile Sensor API:

  1. Download the Mobile Sensor API Reference Implementation binary from Nokia Developer.

  2. Unpack the zip file to your chosen location.

  3. In Eclipse, the Reference Implementation needs to be added as an external JAR in every project that utilizes Mobile Sensor API. To do this for a new project, open the Libraries tab during the project setup phase.

    For an existing project, a similar dialog can be found by right-clicking on the project, selecting Properties, and clicking on the Java Build Path option. From there, open the Libraries tab.

    Figure: Adding Mobile Sensor API support in Eclipse

  4. In the Libraries tab, click on the Add External JARs button. A dialog opens for locating the Reference Implementation.

  5. Locate a file called sensor.zip from where you unzipped the package downloaded in step 1. sensor.zip is placed in [%UNZIP_DIRECTORY%]\Nokia_Prototype_SDK_2_0\devices\Prototype_2_0_S60_MIDP_Emulator\lib\ext.

Configuring NetBeans

To configure NetBeans to support the Mobile Sensor API:

  1. Download the Mobile Sensor API Reference Implementation binary from Nokia Developer.

  2. Unpack the zip file to your chosen location. NetBeans uses the Reference Implementation directly from this location.

  3. Follow the instructions in section Configuring NetBeans. The Reference Implementation binary is considered the equivalent of an SDK in the installation instructions.