Provides information about the device running the Lens. Accessible through global.deviceInfoSystem.

var osType = global.deviceInfoSystem.getOS();
var isMobile = (osType == OS.iOS || osType == OS.Android);
interface DeviceInfoSystem {
    screenScale: number;
    getOS(): OS;
    getTrackingCamera(): DeviceCamera;
    getTypeName(): string;
    isDesktop(): boolean;
    isEditor(): boolean;
    isMobile(): boolean;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    isSpectacles(): boolean;
}

Hierarchy (view full)

Properties

screenScale: number

Methods

  • Exposes User Data

    Returns the operating system type of the device.

    Returns OS

  • Returns whether the current Lens is running in a desktop computer.

    Returns boolean

  • Returns whether the current Lens is running in Lens Studio.

    Returns boolean

  • Returns whether the current Lens is running in a mobile device.

    Returns boolean

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

  • Returns whether the current Lens is running in a Spectacles device.

    Returns boolean