Sensor interaction

The following types of interaction are enabled by using the sensors on the device:

  1. Tapping the device (e.g. double tap) to perform a given function. Note: Tapping interaction is not recommended for touch devices since the tap might also be interpreted as a touch action if you tap on the touch screen area.

  2. Changing the screen orientation on the device from portrait to landscape as the device is rotated.

  3. Silencing an incoming call when the device orientation is changed from screen down (for example on a table) to screen up and back again).

  4. Changing application settings based on the ambient light conditions, e.g. bright sunshine or night time.

  5. In a map application, changing the orientation of a map based on the device's compass orientation.

  6. Allowing movement gestures, such as device rotation, to trigger an action.

  7. Trigger an action when the device comes in close proximity to the user's hand or head.

The supported sensor interactions are configurable on the device. The users should be given the option to set which ones they would like to use.

As well as sensing actions, the device can give tactile (vibrating) feedback in order to acknowledge that the interaction has been successful.

Using sensor interaction in C++ applications

The APIs to use for sensor interaction are the Sensor channel API and the Sensor definitions API.

For implementation information and description of the APIs, see the API specification for the sensor APIs.

Sensors channels come in three types based on the kind of data that is delivered on the sensor channel: event, status, and continuous data. For more information, see Definitions for the sensor APIs.