Provides links based on @capacitor/device
.
- Install this package in your deep by using npm-packager
- Insert a link of type Device
- Change its object value to the object with propertied described in Device Object Value
or
Insert a link of any type with a any name of the list described in Device Object Value from Device link to the same Device link and set its value to the value of the corresponding property of the Device object value
The Device
link can have object value that can have following properties:
- name (type: String): The name of the device.
- operatingSystem (type: String): The operating system of the device.
- webViewVersion (type: String): The version of the WebView on the device.
- manufacturer (type: String): The manufacturer of the device.
- languageCode (type: String): The language code set on the device.
- batteryLevel (type: Number): The battery level of the device.
- languageTag (type: String): The language tag set on the device.
- isCharging (type: Boolean): Whether the device is charging or not.
- osVersion (type: String): The version of the operating system on the device.
- isVirtual (type: Boolean): Whether the device is virtual or not.
- platform (type: String): The platform on which the device runs.
- model (type: String): The model of the device.
No one field is required. You can add any of these fields as you want
{
"identifier": "d787dc6b-041f-4a61-8078-d5573c2e7a4e",
"model": "X11",
"platform": "web",
"isVirtual": false,
"osVersion": "x86.64",
"isCharging": true,
"languageTag": "en",
"batteryLevel": 1,
"languageCode": "en",
"manufacturer": "Google Inc.",
"webViewVersion": "113.0.0.0",
"operatingSystem": "unknown"
}
This package includes the HandleUpdate
functionality (type: UpdateHandler) that is used to handle updates related to the Device
object. HandleUpdate
uses handler from @freephoenix888/object-to-links-async-converter
to convert Device object value to links everytime when you update it
Feel free to contribute. Please fork the repository and submit a pull request for any bugs, improvements, or features.