mobileSensorAvailable

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
mobileSensorAvailable(<sensor>)
Summary

Returns the availability of the given sensor.

Introduced5.5
OSios, android
Platformsmobile
Parameters
NameTypeDescription
sensor

The name of the sensor

"location": the location sensor of the device
"heading": the heading sensor of the device
"acceleration": the acceleration sensor of the device
"rotation rate": the rotation sensor of the device
Example
get mobileSensorAvailable("location")
put mobileSensorAvailable("heading") into tHeadingSensorAvailable
Values
NameTypeDescription
return

Returns true is the sensor is available, false otherwise.

RelatedCommand: mobileStopTrackingSensor, mobileStartTrackingSensor
Function: mobileSensorReading
Description

Use the mobileSensorAvailable function to find out if a sensor is available.

The mobileSensorAvailable function returns the availability of the named sensor.