Skip to main content
Version: Next

Get Platform Info

Get platform information.

Description

Retrieves information about the underlying platform, like operating system and browser name, and detects if a device is mobile. Gets data from navigator.userAgent (a Navigator object can be retrieved using the read-only window.navigator property).

<b><u><i>Exampe:</b></u></i>
If userAgent is:
<b>Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1</b>,
The brick will output: OS Version = 16.6.0

OS = IOS

Browser Version = 16.6

Browser = Safari

isMobile = true

Outputs

  • Browser (String): The name of the browser.
  • Browser Version (String): Version information for the browser.
  • OS (String): Operating System name.
  • OS Version (String): Version information for the Operating system.
  • Is Mobile (Boolean): Detects if device is mobile