Sensor Enable

Kalipso - Form - Actions - Actions Description - Group GPS - Sensor Enable

Enables a specified sensor, if it is available in the current device.

Action available for the following operating systems:

Parameters

  • Sensor Type <unquoted string> - The type of sensor to enable. The available sensor types are:

    • Accelerometer

    • Activity

    • Ambient Temperature

    • Atmospheric Pressure

    • Gyroscope

    • Light

    • Magnetic

    • Orientation

    • Pedometer

    • Proximity

    • Relative Humidity

    • Location

  • Sampling Period (ms) <numeric> - The requested sampling period. This value determines of often you want the O.S. to trigger events for this sensor. This value is a request, but the O.S. can send in higher or lower frequency than requested.

  • Allow Subsampling <numeric> - If the O.S. sends values in a much higher frequency than requested, this option specifies if Kalipso can try to make a subsampling, so you don't receive too many events for a sensor if you don't want to. It can be 1-Yes or 2-No.

Accelermoter specific parameters:

  • Filter Alpha <numeric> - The alpha value used in the filter to determine linear acceleration. The accelerometer will provide acceleration values that are affected by gravity. The filter algorithm will try to filter gravity to provide a linear acceleration.

  • Target Acceleration in X Axis <numeric> - The control or variable to store the X Axis Acceleration value in m/s2.

  • Target Acceleration in Y Axis <numeric> - The control or variable to store the Y Axis Acceleration value in m/s2.

  • Target Acceleration in Z Axis <numeric> - The control or variable to store the Z Axis Acceleration value in m/s2.

  • Target Linear Acceleration in X Axis <numeric> - The control or variable to store the X Axis Linear Acceleration value in m/s2.

  • Target Linear Acceleration in Y Axis <numeric> - The control or variable to store the Y Axis Linear Acceleration value in m/s2

  • Target Linear Acceleration in Z Axis <numeric> - The control or variable to store the Z Axis Linear Acceleration value in m/s2.

The Accelerometer filter used to determine linear acceleration is available at: http://developer.android.com/guide/topics/sensors/sensors_motion.html#sensors-motion-accel

Activity specific parameters:

  • Target Activity Type <numeric> - The control or variable to store the type of activity detected. It can be:

    • 0 - Unknown Activity.

    • 1 - Active but Idle. The device is active but in an idle state like resting still on a table.

    • 2 - The device is not moving.

    • 3 - The device is making minor movements while the user is stationary.

    • 4 - The user is walking.

    • 5 - The user is running or moving faster than normal walking rate.

    • 6 - The user is travelling in a motor vehicle.

    • 7 - The user is riding a bicycle.

  • Target Confidence Level <numeric> - The control or variable to store the confidence level that the system has for the activity.

The capability to determine certain types of activities is platform and hardware dependent.

Ambient Temperature specific parameters:

  • Target Temperature <numeric> - The control or variable to store the current temperature in .

Atmospheric Pressure specific parameters:

  • Target Pressure <numeric> - The control or variable to store the current ambient pressure in hPa.

Gyroscope specific parameters:

  • Target Rotation in X Axis <numeric> - The control or variable to store the X Axis rotation value in rad/s.

  • Target Rotation in Y Axis <numeric> - The control or variable to store the Y Axis rotation value in rad/s.

  • Target Rotation in Z Axis <numeric> - The control or variable to store the Z Axis rotation value in rad/s.

Light specific parameters:

  • Target Illuminance <numeric> - The control or variable to store the illuminance value in Lux.

Magnetic specific parameters:

  • Target Field Strength in X Axis <numeric> - The control or variable to store the X Axis field strength value in microteslas.

  • Target Field Strength in Y Axis <numeric> - The control or variable to store the Y Axis field strength value in microteslas.

  • Target Field Strength in Z Axis <numeric> - The control or variable to store the Z Axis field strength value in microteslas.

Orientation specific parameters:

  • Target Angle in X Axis <numeric> - The control or variable to store the X Axis orientation in degrees.

  • Target Angle in Y Axis <numeric> - The control or variable to store the Y Axis orientation in degrees.

  • Target Angle in Z Axis <numeric> - The control or variable to store the Z Axis orientation in degrees.

Pedometer specific parameters:

  • Target Cumulative Step Count <numeric> - The control or variable to store the current step count.

The step count is cumulative and managed by the O.S. If your app enables the pedometer sensor and the device goes into suspend/sleep state or the user opens another app, the O.S. will continue to count the steps, so when you get a step count it will be a cumulative value. Normally the first reading reported is the current step count, and after the O.S. will start providing new step count as the user takes steps.

Proximity specific parameters:

  • Target Distance <numeric> - The control or variable to store the distance reading in mm.

Many devices only have basic proximity sensors, and report only 2 distinct values, like 0mm/1mm, or 0mm/10mm. It is normally used to determine if the device has some object very close to it like the users head when talking on the phone.

Relative Humidity specific parameters:

  • Target Relative Humidity <numeric> - The control or variable to store the relative humidity value in %.

Location specific parameters:

  • Target Longitude <numeric> - The control or variable to store the longitude in degrees.

  • Target Latitude <numeric> - The control or variable to store the latitude in degrees.

  • Target Altitude <numeric> - The control or variable to store the altitude in meters.

  • Target Speed <numeric> - The control or variable to store the speed in meters/second.

  • Target Bearing <numeric> - The control or variable to store the bearing in degrees.

  • Keep active while in Background <numeric> - If 1-Yes, then a request will be made to the O.S. to keep providing location updates even if the App is in the background. When compiling for Apple you need to select the option "Enable Background Location".

  • Background Location Description Title <string> - For Android only, when enabling background location a foreground service will be created and a message is associated containing this title.

  • Background Location Description Body <string> - For Android only, when enabling background location a foreground service will be created and a message is associated containing this body.

On iOS devices, enabling Proximity sensor will case screen to turn off when sensor is covered

Use only background Location if you really have to. It may drain the battery of the device much faster than usual, and you may have dificulties getting your App approved in the Stores if you don't have a valid reason for doing so.

Last updated