• Returns the Pixel instance corresponding to the given system id. The latter is assigned by the system to Bluetooth devices, see Pixel.systemId.

    This function doesn't check the actual availability nor the connection state of the die. The later might be turned off, available or already connected.

    As of Chrome 122, only Pixels dice authorized by the user during the current browser session may be returned.

    With the "Use the new permissions backend for Web Bluetooth" flag enabled in Chrome, Pixels dice authorized by the user in previous browser sessions (and not revoked since) will also be returned. To enable this flag, open the following address in Chrome: chrome://flags/#enable-web-bluetooth-new-permissions-backend and toggle the flag to Enabled.

    The returned promise will resolve to undefined when there is no authorized Pixel with the given system id.

    Parameters

    • systemId: string

      A string assigned by the system that uniquely identifies a Pixel die.

    Returns Promise<Pixel | undefined>

    A promise that resolves to a Pixel instance if the Bluetooth device was previously authorized, or undefined.

    Remarks

    • See getBluetoothCapabilities to check Bluetooth availability and if the new permissions backend is enabled.
    • See requestPixel to request the user to give access to a new Pixels die.

Generated using TypeDoc