npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

capacitor-plugin-hanwha-device

v0.0.8

Published

The Device API exposes internal information about the device, such as the model and operating system version, along with user information such as unique ids.

Downloads

27

Readme

hanwhadevice

Device Info

Install

npm install hanwhadevice
npx cap sync

API

getId()

getId() => Promise<DeviceId>

Return an unique identifier for the device.

Returns: Promise<DeviceId>

Since: 1.0.0


getInfo()

getInfo() => Promise<DeviceInfo>

Return information about the underlying device/os/platform.

Returns: Promise<DeviceInfo>

Since: 1.0.0


getBatteryInfo()

getBatteryInfo() => Promise<BatteryInfo>

Return information about the battery.

Returns: Promise<BatteryInfo>

Since: 1.0.0


getLanguageCode()

getLanguageCode() => Promise<GetLanguageCodeResult>

Get the device's current language locale code.

Returns: Promise<GetLanguageCodeResult>

Since: 1.0.0


Interfaces

DeviceId

| Prop | Type | Description | Since | | ---------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | uuid | string | The UUID of the device as available to the app. This identifier may change on modern mobile platforms that only allow per-app install UUIDs. On web, a random identifier is generated and stored on localStorage for subsequent calls. | 1.0.0 |

DeviceInfo

| Prop | Type | Description | Since | | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | name | string | The name of the device. For example, "John's iPhone". This is only supported on iOS and Android 7.1 or above. | 1.0.0 | | model | string | The device model. For example, "iPhone". | 1.0.0 | | platform | 'ios' | 'android' | 'web' | The device platform (lowercase). | 1.0.0 | | operatingSystem | OperatingSystem | The operating system of the device. | 1.0.0 | | osVersion | string | The version of the device OS. | 1.0.0 | | manufacturer | string | The manufacturer of the device. | 1.0.0 | | isVirtual | boolean | Whether the app is running in a simulator/emulator. | 1.0.0 | | memUsed | number | Approximate memory used by the current app, in bytes. Divide by 1048576 to get the number of MBs used. | 1.0.0 | | diskFree | number | How much free disk space is available on the the normal data storage path for the os, in bytes. On Android it returns the free disk space on the "system" partition holding the core Android OS. On iOS this value is not accurate. | 1.0.0 | | diskTotal | number | The total size of the normal data storage path for the OS, in bytes. On Android it returns the disk space on the "system" partition holding the core Android OS. | 1.0.0 | | realDiskFree | number | How much free disk space is available on the the normal data storage, in bytes. | 1.1.0 | | realDiskTotal | number | The total size of the normal data storage path, in bytes. | 1.1.0 | | webViewVersion | string | The web view browser version | 1.0.0 |

BatteryInfo

| Prop | Type | Description | Since | | ------------------ | -------------------- | ----------------------------------------------------------------- | ----- | | batteryLevel | number | A percentage (0 to 1) indicating how much the battery is charged. | 1.0.0 | | isCharging | boolean | Whether the device is charging. | 1.0.0 |

GetLanguageCodeResult

| Prop | Type | Description | Since | | ----------- | ------------------- | ---------------------------- | ----- | | value | string | Two character language code. | 1.0.0 |

Type Aliases

OperatingSystem

'ios' | 'android' | 'windows' | 'mac' | 'unknown'