0.0.1 • Published 10 months ago

capacitor-temperature v0.0.1

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

capacitor-temperature

The DeviceTemperature is a Capacitor plugin that provides an easy-to-use interface to access the current temperature of the user's device.

Install

npm install capacitor-temperature
npx cap sync

API

getTemperature()

getTemperature() => Promise<{ temperature: number; }>

Returns: Promise<{ temperature: number; }>


addListener('temperatureUpdate', ...)

addListener(eventName: 'temperatureUpdate', listenerFunc: (data: { temperature: number; }) => void) => PluginListenerHandle
ParamType
eventName'temperatureUpdate'
listenerFunc(data: { temperature: number; }) => void

Returns: PluginListenerHandle


Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>