capacitor-temperature
v0.0.1
Published
The DeviceTemperature is a Capacitor plugin that provides an easy-to-use interface to access the current temperature of the user's device.
Downloads
1
Maintainers
Readme
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
| Param | Type |
| ------------------ | -------------------------------------------------------- |
| eventName
| 'temperatureUpdate' |
| listenerFunc
| (data: { temperature: number; }) => void |
Returns: PluginListenerHandle
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |