mobileEnableAccelerometer

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
mobileEnableAccelerometer [<interval>]
Synonymsiphoneenableaccelerometer
Summary

Enables the accelerometer so that accelerationChanged events are delivered.

Introduced4.5.2
OSios, android
Platformsmobile
Parameters
NameTypeDescription
interval

Specified in seconds and is the approximate time between delivery of messages.

Example
mobileEnableAccelerometer 100
RelatedCommand: mobileDisableAccelerometer
Message: accelerationChanged
Property: defaultStack
Description

The mobileEnableAccelerometer command enables the accelerometer on the device.

The mobileEnableAccelerometer command will cause accelerationChanged events to be delivered to the current card of the defaultStack at the specified interval.

Note: The interval is constrained by hardware-specific minimums and maximums (which are left unspecified by Apple).

Tagsui