Lens Scripting API

    Class InternetStatusChangedArgs

    Arguments used with the onInternetStatusChanged event.

    Example js

    // @input Component.Text textObject
    global.deviceInfoSystem.onInternetStatusChanged.add(function(eventData) {
    script.textObject.text = eventData.isInternetAvailable
    ? "UPDATED: Internet is available"
    : "UPDATED: No internet";
    });

    Example ts

    @component
    export class NewScript extends BaseScriptComponent {
    @input textObject: Text;

    onAwake() {
    global.deviceInfoSystem.onInternetStatusChanged.add((args) => {
    this.textObject.text = args.isInternetAvailable
    ? "UPDATED: Internet is available"
    : "UPDATED: No internet";
    });
    }
    }

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    isInternetAvailable: boolean

    Whether the device has access to the internet.

    Methods

    • 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

    MMNEPVFCICPMFPCPTTAAATR