MobileMotion
From Xojo Documentation
Class (inherits from MobileControl)
This class is supported on Mobile. Use #If...#Endif with the Target... constants to ensure you only use this class where it is supported. |
New in 2020r2
Provides motion updates from the device.
Shared Methods | ||
|
Notes
On iOS motion updates include both the accelerometer and gyroscope.
Only one MobileMotion object can be created per application for performance reasons. You cannot create a new MobileMotion instance using "New MobileMotion".
You can check and compare the property values at specific points in your code or regularly using a Timer. To save on battery, you should disable motion detection when it is not needed.
The motion properties return real values only after the Start method has been called. If Start has not been called or Stop has been called, they return 0.
The iOS Simulator does not provide motion data, so you will need to test on an app running on an actual device to see how these property values change. |