|
Mobile Sensor API Version 1.2 | |||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Packages | |
---|---|
javax.microedition.sensor |
This package provides the classes and interfaces of the
Mobile Sensor API mandatory part. |
javax.microedition.sensor.control |
This Mobile Sensor API package is optional and it enables the
control of the sensor. |
This document defines JSR 256, the Mobile Sensor API, version 1.2.
Author: Java Community Process / JSR 256 Expert Group (e-mail: [email protected])
Status: Maintenance Release
Released: 2008-12-12
Copyright © 2005-2008 Nokia Corporation. All rights reserved.Version | Published | Description |
---|---|---|
1.2 | 2008-12-12 | Maintenance Release Draft |
NOKIA CORPORATION IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE TERMS CONTAINED IN THIS LICENSE ("LICENSE"). PLEASE READ THE TERMS AND CONDITIONS OF THIS LICENSE CAREFULLY. BY ACCESSING OR USING THE SPECIFICATION YOU WILL BE BOUND BY THE TERMS OF THIS LICENSE.
JSR 256 Mobile Sensor API Specification ("Specification")
Specification Lead: Nokia Corporation ("Specification Lead")
NOTICE; LIMITED LICENSE GRANTS
The Specification Lead hereby grants You a non-exclusive, non-transferable, worldwide, royalty-free, fully paid-up, limited license (without the right to sublicense) solely under intellectual property rights licensable by the Specification Lead to analyze and to use the Specification for research, evaluation, optimization and development purposes. In addition You may make a reasonable number of verbatim copies of this Specification in its entirety for Your private or internal use, as applicable, in accordance with the terms and conditions of this License.
No rights are granted under this License for internal deployment, the creation and/or distribution of implementations of the Specification for direct or indirect (including strategic) gain or advantage, the modification of the Specification (other than to the extent of Your fair use rights) or the distribution of the Specification or making the Specification available for 3rd parties.
Except as expressly set forth in this license, You acquire no right, title or interest in or to Specification or any other intellectual property licensable by the Specification Lead and no other rights are granted by implication, estoppel or otherwise. The Specification may only be used in accordance with the license terms set forth herein. This License will terminate immediately without notice from Specification Lead if You fail to comply with any provision of this License.
TRADEMARKS
Nokia is a registered trademark of Nokia Corporation. Nokia Corporation's product names are either trademarks or registered trademarks of Nokia Corporation. Your access to this Specification should not be construed as granting, by implication, estoppel or otherwise, any license or right to use any marks appearing in the Specification without the prior written consent of Nokia Corporation or Nokia's licensors. No right, title, or inte1rest in or to any trademarks, service marks, or trade names of any third parties, is granted hereunder.
You shall not be allowed to remove any of the copyright statements or disclaimers or other proprietary notices contained in the Specification and You are obliged to include the copyright statement and the disclaimers, if any, in any copies of the Specification You make.
DISCLAIMER OF WARRANTIES
SUBJECT TO ANY STATUTORY WARRANTIES OR CONDITIONS WHICH CAN NOT BE EXCLUDED, THE SPECIFICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OR CONDITION OF ANY KIND EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, AND STATUTORY ARE HEREBY DISCLAIMED. THE ENTIRE RISK ARISING OUT OF OR RELATING TO THE USE OR PERFORMANCE OF THE SPECIFICATION REMAINS WITH YOU.
THE SPECIFICATION MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION THEREIN; THESE CHANGES WILL BE INCORPORATED INTO NEW VERSIONS OF THE SPECIFICATION, IF ANY. SPECIFICATION LEAD MAY MAKE IMPROVEMENTS AND/OR CHANGES TO THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THE SPECIFICATION AT ANY TIME. Any use of such changes in the Specification will be governed by the then-current license for the applicable version of the Specification.
LIMITATION OF LIABILITY
TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL THE SPECIFICATION LEAD OR ITS SUPPLIERS BE LIABLE FOR ANY LOST PROFITS, LOST SAVINGS, LOST REVENUE, LOST DATA, PROCUREMENT OF SUBSTITUE GOODS, OR FOR ANY DIRECT, INDIRECT, INCIDENTIAL, SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, EVEN IF THE SPECIFICATION LEAD OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES OR DAMAGES. IN ADDITION THE SPECIFICATION LEAD AND ITS SUPPLIERS WILL NOT BE LIABLE FOR ANY DAMAGES CLAIMED BY YOU BASED ON ANY THIRD PARTY CLAIM.
Some jurisdictions do not allow the exclusion of implied warranties, or the limitation for consequential damages, so Section 4.1 may not apply to You in whole, but in such case Section 4.1 will apply to You to the maximum extent permitted by applicable law.
EXPORT CONTROL
You shall follow all export control laws and regulations relating to Specification.
RESTRICTED RIGHTS LEGEND
Note to U.S. Government Users. The Specification is a "Commercial Items", as that term is defined at 48 C.F.R. 2. 101, consisting of "Commercial Computer Software" and "Commercial Computer Software Documentation", as such terms are used in 48 C.F.R. 12.212 or 48 C.F.R. 227.7202, as applicable. Consistent with 48 C.F.R. 12.212 or 48 C.F.R. 227.7202-1 through 227.7202-4, as applicable, the Commercial Computer Software Documentation are being licensed to U.S. Government end users a) only as Commercial Items and b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States.
This specification was produced by the JSR 256 Expert Group in the Java Community Process (JCP). For more information, visit the JSR 256 web page.
The Expert Group consisted of representatives from the following companies (in alphabetical order):
Ben Q Corporation
Esmertec AG
LG Electronics Inc.
Motorola
Nokia Corporation
Samsung Electronics Corporation
Siemens AG
SK Telecom Co., Ltd.
Sony Ericsson Mobile Communications AB
SouJava
Tridium
Vodafone Group Services Limited
Your comments about this specification are welcome. Please send them by electronic mail to the following address:
<[email protected]>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY" and "OPTIONAL" in this specification are to be interpreted as described in RFC 2119 (see "Related documentation").
Monospaced type
is used to denote literal text, such as
SensorConnection
and ConditionListener
This specification defines the JSR 256 Mobile Sensor API that allows Java ME application developers to fetch data easily and uniformly from sensors. A sensor is any measurement data source. Sensors vary from physical sensors such as magnetometers and accelerometers to virtual sensors, which combine and manipulate the data they have received from other kinds of physical sensors. Examples of virtual sensors could include, for example, battery level sensor indicating the remaining charge in a battery, or a field intensity sensor that measures the reception level of the mobile network signal in a mobile phone. The sensor may be connected to the mobile device in different ways, represented by the connection type, examples of which are embedded, short-range wireless, wired, and remote connection type.
The API also provides means to monitor measured data. The application can register a listener and set limits and ranges for monitoring. If the measured value meets any of defined conditions the listener is notified.
The API is split in two mandatory parts:
javax.microedition.sensor
javax.microedition.sensor.control
The package javax.microedition.sensor
provides API for receiving the information from a sensor.
The package javax.microedition.sensor.control
represents examples of possible controls, for example for starting, stopping, calibrating, and setting a measurement range
or accuracy
and provices an interface for implementing new controls.
Concept |
Short description |
---|---|
calibration |
The act of adjusting reliable measurements of a sensor. |
channel |
A way to structure data from a sensor to interrelated degrees of freedom, for example, an accelerometer measuring x-, y-, and z-axis acceleration. |
condition |
A premise for measured sensor data upon which the notification, or launch of a sensor application depends. |
context type |
The interrelated environment in which the measurement occurs. In this specification context type is used as an attribute of a sensor to qualify the usage, for example, to make distinction between air and clinical thermometers. |
GCF |
The Java ME Generic Connection Framework (GCF) offers a basis for generic connections and this connection convention is already widely used. Here in JSR 256 it is used to establish a connection to a given sensor. |
measurement range |
The limits within which a sensor is making measurements. |
PushRegistry |
MIDP 2.0 PushRegisty offers push mechanism to enable automatic launch of a defined application. For sensors push means a sensor becoming available, or meeting a monitored condition. |
quantity |
The aspect in which a thing is measurable in terms of greater, less, or equal or of increasing or decreasing magnitude. Used in qualifying the desired sensor, much like the context type. |
resolution |
The capability of a sensor of making distinguishable measurements; the granularity of the measurement. |
scale |
A sequence of marks representing equal steps used as a reference in making measurements. Scaling enables fixed point presentation to optimize performance, or more convenient presentation of very small, or large data values. Scaling can be understood as prefixing a used unit. Resolving is the opposite operation to scaling leading to basic units, where the scaling factor is 0. |
sensor |
The device that responds to a physical stimulus, here any measurement data source that gives measurements. |
unit |
A determinate quantity (as of length, time, heat, or value) adopted as a standard of measurement. Standard SI units are preferred. Prefixing may be done with scaling. |
New scenarios are within reach when a device works with sensors:
Benefit games with motion-related input modalities; a device could act as a game control with the help of accelerometers.
Improve accessibility and usability of mobile applications: the backlight of the display could be adjusted according to the ambient illuminance level or the text font size and the orientation in a user interface could be adjusted according to the orientation of a device.
Identify the user with biometric sensors making misuse of a device more difficult and customizing user experience with identity-based profiles.
Monitor the user during sport exercise and provide information for fitness category applications. A heart rate sensor and step counter could be examples of used sensors.
Monitor, e.g., temperature, air pressure, or wind speed and notify a user if alarming condition is met.
Read wireless sensors of a smart home.
The API is designed as an Optional Package that can be used with many Java Micro Edition Profiles. The minimum platform required by this API is the Connected, Limited Device Configuration (CLDC), version 1.1. The API can also be used with Connected Device Configuration (CDC), version 1.0, and any subsequent platform versions that are supersets of the minimum platform.
Applications MUST be able to determine the version of Mobile Sensor API present in the device, if any,
by querying the value of the system property microedition.sensor.version
.
For implementations complying to this specification, the value of the system property
MUST be the string "1.2". If the returned value is null
,
the Mobile Sensor API MUST NOT be present in the platform.
[MIDP20] Mobile Information Device Profile, version 2.0. Java Community Process. http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
[LEGO] Lego MindstormsTM RCX microcontroller, Java Sensor API (tinyvm.rcx.Sensor). Lego. http://lejos.sourceforge.net/tutorial/index.html
[JTI] Java Transducer Interface(JTI). java.net. https://jti.dev.java.net/
[JMDI] Java Measurement Dataflow Interface (JMDI). java.net. https://jmdi.dev.java.net/
[JSR108] JSR 108: Units specification. Java Community Process. http://jade.dautelle.com/api/jade/units/package-summary.html
[OSGI] Measurement and State Specification version 1.0 of OSGi Service Platform Release 3. OSGi. "http://www.osgi.org/osgi_technology/index.asp?section=2"
Appendix A. Finding sensors
Appendix B. Security considerations
Appendix C. Automatic launch
Appendix D. Code examples
Appendix E. Sensor definitions
|
Mobile Sensor API Version 1.2 | |||||||||
PREV NEXT | FRAMES NO FRAMES |