0.0.2 • Published 8 months ago

@danyalwe/capacitor-systeminfo v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Capacitor Plugin - SystemInfo

Get access to every info about the device software and hardware!

Supported Android version: 21+\ Supported iOS version: Not supported\ Supported Browsers: Chromium-based

Install

npm install @danyalwe/capacitor-systeminfo
npx cap sync

Todos

  • Improve documentation, add JSDoc strings
  • Add support for iOS
  • Add CPU usage

Supported methods

NameAndroidiOSWeb
getInfos
start
stop
addListener
removeAllListeners

Supported properties

SoftwareInfosAndroidiOSWeb
osName
osVersion
brandName
sdkVersion
sdkName
securityPatch
uiVersion
deviceID
boardName
bootloaderVersion
supportedABIs
HardwareInfosAndroidiOSWeb
manufacturer
features
totalCores
totalRAM
totalHDD
totalSD
modelID
modelCodeName
cpuModel
cpuCores
RuntimeInfosAndroidiOSWeb
usedRAM
usedHDD
usedSD

API

getInfos()

getInfos() => Promise<SystemInformations>

Returns: Promise<SystemInformations>


start()

start() => Promise<void>

stop()

stop() => Promise<void>

addListener('runtimeChange', ...)

addListener(eventName: 'runtimeChange', listenerFunc: (event: RuntimeInfos) => void) => Promise<PluginListenerHandle>
ParamType
eventName'runtimeChange'
listenerFunc(event: RuntimeInfos) => void

Returns: Promise<PluginListenerHandle>


removeAllListeners()

removeAllListeners() => Promise<void>

Interfaces

SoftwareInfos

PropType
osNamestring
osVersionstring
brandNamestring
sdkVersionnumber
sdkNamestring
securityPatchstring
uiVersionstring
deviceIDstring
boardNamestring
bootloaderVersionstring
supportedABIsstring[]

HardwareInfos

PropType
modelIDstring
modelCodeNamestring
cpuModelstring
cpuCoresnumber, number
totalSDnumber
totalHDDnumber
totalRAMnumber
totalCoresnumber
manufacturerstring
featuresFeatures[]

PluginListenerHandle

PropType
remove() => Promise<void>

RuntimeInfos

PropType
usedRAMnumber
usedHDDnumber
usedSDnumber

Type Aliases

SystemInformations

SoftwareInfos & HardwareInfos

Features

'bluetooth' | 'bluetoothLowEnergy' | 'microphone' | 'speaker' | 'nfc' | 'camera' | 'gamepad' | 'gps' | 'touchscreen' | 'wifi' | 'fingerprint' | 'face' | 'ethernet'