Device Info Extension Documentation

Advanced Device and Browser Information for Project Development

Overview

The Device Info Extension provides comprehensive tools for retrieving detailed information about the user's device, browser, and system capabilities.

Battery Information Blocks

Battery Level

Retrieves current battery percentage.

battery level %

Returns a number between 0-100 or -1 if unsupported.

Charging Status

Checks if device is currently charging.

is charging?

Returns true or false.

System Information Blocks

Device OS

Identifies the operating system.

device OS

Returns OS name (Windows, macOS, Linux, etc).

OS Version

Retrieves current OS version.

current OS version

Returns detailed version information.

Browser Name

Identifies the current web browser.

browser name

Returns browser type (Chrome, Firefox, etc).

Device Capabilities

Touch Support

Checks for touchscreen capabilities.

touch support?

Returns true or false.

Mobile Detection

Determines if device is mobile.

is mobile?

Returns true or false.

Example Usage


// Check battery level
if (battery level %) < 20 then
    broadcast [low battery warning]
end

// Check device type
if (is mobile?) then
    broadcast [mobile device detected]
end
                

Limitations

  • Some features depend on browser support
  • Privacy settings may restrict information
  • Accuracy varies across different devices