Type Event Revision Release 2024.3703 Keywords heading, compass
These are events generated by the compass hardware, if available on the device.
On iOS, you can use the appropriate UIRequiredDeviceCapabilities
key to limit an app to devices with specific capabilities. On Android, you can include the usesFeatures
table for the same purpose. Please see the Project Build Settings guide for more information.
Android only supports event.magnetic, not event.geographic.
To enable heading events on Android devices, you must set the following permission in build.settings
:
settings = { android = { usesPermissions = { "android.permission.ACCESS_FINE_LOCATION" }, }, }