Mobile Sensor API is not supported directly in S60 5th Edition SDK, although it will be included in future SDK releases. When using the S60 5th Edition SDK, you need to install the Mobile Sensor API Reference Implementation to utilize the features in Mobile Sensor API.
The following instructions describe how to add Mobile Sensor API support for Eclipse and NetBeans.
Note: The Reference Implementation can only be used for compiling. Testing must be done with the real device.
Download the Mobile Sensor API Reference Implementation binary from Forum Nokia web site.
Unpack the zip file to your chosen location. NetBeans uses the Reference Implementation directly from this location.
If you are using NetBeans, follow the instructions in section Configuring NetBeans. The Reference Implementation binary is considered the equivalent of an SDK in the installation instructions.
Before starting, make sure that you have Eclipse correctly set up as described in section Configuring Eclipse.
Download the Mobile Sensor API Reference Implementation binary from Forum Nokia web site.
Unpack the zip file to your chosen location.
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 in Java Settings phase.
On 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 for Eclipse
In Libraries tab, click on the Add External JARs button. A dialog opens for locating the Reference Implementation.
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
.