Returns the value of a specified sensor for an iOS device.
GetSensor(sensorName{;option1;option2})
sensorName
- the name of a supported sensor (see below).
option1
- optional parameter for the specified sensor.
option2
- optional parameter for the specified sensor.
Parameters in braces { } are optional.
text, number
FileMaker Pro Advanced 17.0
Use this function to capture information provided by sensors for an iOS device running FileMaker Go. For example, you can find out the distance or number of steps traveled by a user; or the acceleration, speed, heading, and attitude for an iOS device.
| Returns | Data type returned |
|
|
Battery |
| |||
| The battery charge level (from 0.0 to 1.0). | number |
|
|
| A number representing the status of the battery charge: | number |
|
|
|
|
|
|
|
Location |
| |||
| The current location of an iOS device in the format:
| text1 |
|
|
| The current location of an iOS device in the format:
| text1 |
|
|
|
|
|
|
|
Attitude, speed, and acceleration |
| |||
| The attitude for the iOS device in radians in the format:
| text1 |
|
|
| The rotation rate of the iOS device (in radians per second) in the format:
| text1 |
|
|
| The acceleration the user is giving to the iOS device in meters per second squared (m/s2) in the format:
| text1 |
|
|
| The gravity acceleration in meters per second squared (m/s2) in the format:
| text1 |
|
|
| The speed of the device in meters per second. | number |
|
|
| The current direction of movement (in degrees). It returns a value from 0.0 to 359.9 degrees. | number |
|
|
|
|
|
|
|
Magnetic |
| |||
| The magnetic field vector (in microteslas), with respect to the current attitude of the iOS device, in the format:
| text1 |
|
|
| The orientation of the user’s device (in degrees) relative to magnetic north. It returns a value from 0.0 to 359.9 degrees. | number |
|
|
| The orientation of the user’s device (in degrees) relative to true north. It returns a value from 0.0 to 359.9 degrees. | number |
|
|
|
|
|
|
|
Step counts |
| |||
| The number of steps detected by the device for the specified duration. | number |
|
|
| The estimated distance (in meters) traveled by the user for the specified duration. | number |
|
|
| The approximate number of floors ascended by the user for the specified duration. | number |
|
|
| The approximate number of floors descended by the user for the specified duration. | number |
|
|
|
|
|
|
|
Air pressure |
| |||
| The recorded air pressure (in kilopascals). | number |
|
|
|
|
|
|
|
List of sensors |
| |||
| A list of available | text |
|
|
1. The data is returned as a list of numbers separated by carriage returns.
•accuracy
is a number that represents a distance in meters. The default value for accuracy
is 100 meters.
•timeout
is a number that represents the longest time (in seconds) it will take to get the data. The default value for timeout
is 10; the maximum value is 600.
•The default value for forPastSeconds
is the number of seconds since midnight.
•FileMaker Go returns an empty string if the sensor is not available for the device.
•The values for location
are the same as for the Location function.
•The values for locationValues
are the same as for the LocationValues function.
GetSensor ( "stepCount"; 3600 )
returns 8000 if the user has taken 8000 steps in the past hour.