You Are Here:

Community: Wiki

 

Talk:How to get information about sensors in Java ME

From Forum Nokia Wiki

I'm trying to listen sensors of a Nokia 5800 but this code does not compile. I've downloaded the add-on for the Nokia 5800 and the emulator prototype but nothing. Could be say that it is not possible to access sensors from a J2ME application??

Review

This article discusses the use of the JSR-256 mobile sensor API. The sensor API has been around for a while now, but has only relatively recently been supported by Nokia devices with the release of the Nokia 5800 Express Music (as an add-on) and by the Nokia N97 (no add-on necessary). This article gives a nice clear code example of how to use the Sensor API to access information about the various sensors available on a mobile device.

The code example shows how to discover which sensors are available on the device in question through the SensorManager.findSensors method. The programmer can then use the returned SensorInfo objects to view various descriptive details about the available sensors, including a textual description, the sensor's model and the quantity the sensor in question measures. For each SensorInfo object, the available ChannelInfo objects can then be retrieved in order to view what kinds of information that sensor provides.

Usefully, the output of the code on the Nokia N97 is provided, showing what is returned for the acceleration sensor on this device. Three channels are reported for this sensor, one for each axis of acceleration. Information regarding the unit of measurement and accuracy of these sensor channels are also reported. It is interesting to note that the API does not provide direct access to some of the N97's sensors such as the ambient light sensor and the magnetometer.

--Larry101 13:26, 18 September 2009 (UTC)

ERROR

On page

http://wiki.forum.nokia.com/index.php/How_to_get_information_about_sensors_in_Java_ME

the link to "SensorInfoMIDlet.zip" does not download but instead uploading.

Jad and jar files The SensorInfoMIDlet.jad and SensorInfoMIDlet.jar files can be downloaded from SensorInfoMIDlet.zip

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fFileE3aMicrokernelE5fArchitectureE2eGIFX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ