chrome.signedInDevices
- Description
Use the
chrome.signedInDevices
API to get a list of devices signed into chrome with the same account as the current profile. - Permissions
signedInDevices
- AvailabilityDev channel only.
Summary
- Types
- Methods
chrome.signedInDevices.get(isLocal?: boolean, callback: function)
- Events
Types
DeviceInfo
Properties
- chromeVersionstring
Version of chrome running in this device.
- idstring
Unique Id for this device. Note: The id is meaningful only in the current device. This id cannot be used to refer to the same device from another device or extension.
- namestring
Name of the device. This name is usually set by the user when setting up a device.
- os
The OS of the device.
- type
Device Type.
DeviceType
Enum
"desktop_or_laptop"
, "phone"
, "tablet"
, or "unknown"
OS
Enum
"win"
, "mac"
, "linux"
, "chrome_os"
, "android"
, "ios"
, or "unknown"
Methods
get
chrome.signedInDevices.get(isLocal?: boolean, callback: function)
Gets the array of signed in devices, signed into the same account as the current profile.
Parameters
- isLocalboolean optional
If true only return the information for the local device. If false or omitted return the list of all devices including the local device.
- callbackfunction
The callback to be invoked with the array of DeviceInfo objects.
The callback parameter should be a function that looks like this:
(devices: DeviceInfo[]) => {...}
- devices
Events
onDeviceInfoChange
chrome.signedInDevices.onDeviceInfoChange.addListener(listener: function)
Fired when the DeviceInfo object of any of the signed in devices changes, or when a device is added or removed.
Event
- listenerfunction
The listener parameter should be a function that looks like this:
(devices: DeviceInfo[]) => {...}
- devices
The array of all signed in devices.