DeviceData

From Xojo Documentation

Revision as of 16:05, 8 January 2022 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from Object)

New in 2020r2

Provides information about the mobile device such as battery level, orientation and more.

Properties
BatteryLevel fa-lock-32.png IsProximityNear fa-lock-32.png Orientation fa-lock-32.png
BatteryMonitoringEnabled LocalizedModel fa-lock-32.png ProximityMonitoringEnabled
BatteryState fa-lock-32.png Model fa-lock-32.png UserInterfaceType fa-lock-32.png
Identifier fa-lock-32.png Name fa-lock-32.png
Enumerations
BatteryStates Orientations UserInterfaceTypes

Notes

When checking both battery and proximity information, it's important to keep the duration of time in which the app is monitoring this data to a minimum as doing so uses more battery power than usual.

You can get the DeviceData by accessing the System.Device method. DeviceData exists in the System module, so to access its enumerations, use System.DeviceData.

Compatibility

iOS project types on iOS and iPadOS operating systems.

See Also

System module