community-cordova-plugin-battery-status
Advanced tools
Comparing version 2.0.8 to 2.1.0
{ | ||
"name": "community-cordova-plugin-battery-status", | ||
"version": "2.0.8", | ||
"version": "2.1.0", | ||
"description": "Community Cordova Battery Plugin", | ||
@@ -5,0 +5,0 @@ "types": "./types/index.d.ts", |
[![NPM version](https://img.shields.io/npm/v/community-cordova-plugin-battery-status)](https://www.npmjs.com/package/community-cordova-plugin-battery-status) | ||
### This is a fork of the original plugin cordova-plugin-battery-status | ||
# cordova-plugin-battery-status | ||
I dedicate a considerable amount of my free time to developing and maintaining many cordova plugins for the community ([See the list with all my maintained plugins][community_plugins]). | ||
To help ensure this plugin is kept updated, | ||
new features are added and bugfixes are implemented quickly, | ||
please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. | ||
Please consider donating if you're using this plugin in an app that makes you money, | ||
or if you're asking for new features or priority bug fixes. Thank you! | ||
[![](https://img.shields.io/static/v1?label=Sponsor%20Me&style=for-the-badge&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/eyalin) | ||
[comment]: <> ([![Downloads](https://img.shields.io/npm/dm/community-cordova-plugin-battery-status)](https://www.npmjs.com/package/community-cordova-plugin-battery-status)) | ||
@@ -31,5 +46,4 @@ | ||
### This is a fork of the original plugin cordova-plugin-battery-status | ||
# cordova-plugin-battery-status | ||
[![Android Testsuite](https://github.com/apache/cordova-plugin-battery-status/actions/workflows/android.yml/badge.svg)](https://github.com/apache/cordova-plugin-battery-status/actions/workflows/android.yml) [![Chrome Testsuite](https://github.com/apache/cordova-plugin-battery-status/actions/workflows/chrome.yml/badge.svg)](https://github.com/apache/cordova-plugin-battery-status/actions/workflows/chrome.yml) [![iOS Testsuite](https://github.com/apache/cordova-plugin-battery-status/actions/workflows/ios.yml/badge.svg)](https://github.com/apache/cordova-plugin-battery-status/actions/workflows/ios.yml) [![Lint Test](https://github.com/apache/cordova-plugin-battery-status/actions/workflows/lint.yml/badge.svg)](https://github.com/apache/cordova-plugin-battery-status/actions/workflows/lint.yml) | ||
@@ -55,3 +69,9 @@ | ||
- __isPlugged__: A boolean that indicates whether the device is plugged in. _(Boolean)_ | ||
from version 2.1.0 (for Android only for now) we added the following: | ||
- __chargeType__: A string that indicates charging type. _(string)_ | ||
- __temperature__: A number that indicates the battery temperature. _(number)_ | ||
- __technology__: A string that indicates the battery technology. _(string)_ | ||
- __present__: The scale of the battery _(number)_ | ||
- __voltageLevel__: containing the current battery voltage level. _(number)_ | ||
- __currentBatteryHealth__: a string indicates Health level. _(string)_ | ||
## batterystatus event | ||
@@ -121,1 +141,2 @@ | ||
[status_object]: #status-object | ||
[community_plugins]: https://github.com/EYALIN?tab=repositories&q=community&type=&language=&sort= |
@@ -16,7 +16,7 @@ // Type definitions for cordova-plugin-battery-status | ||
* @param type - The event to listen for. | ||
* | ||
* | ||
* `batterystatus`: event fires when the percentage of battery charge changes by at least 1 percent, or if the device is plugged in or unplugged. | ||
* | ||
* | ||
* `batterycritical`: event fires when the percentage of battery charge has reached the critical battery threshold. The value is device-specific. | ||
* | ||
* | ||
* `batterylow`: event fires when the percentage of battery charge has reached the low battery threshold, device-specific value. | ||
@@ -30,7 +30,7 @@ * @param listener - The function that executes when the event fires. The function is passed an BatteryStatusEvent object as a parameter. | ||
* @param Atype - The event to stop listening for. | ||
* | ||
* | ||
* `batterystatus`: event fires when the percentage of battery charge changes by at least 1 percent, or if the device is plugged in or unplugged. | ||
* | ||
* | ||
* `batterycritical`: event fires when the percentage of battery charge has reached the critical battery threshold. The value is device-specific. | ||
* | ||
* | ||
* `batterylow`: event fires when the percentage of battery charge has reached the low battery threshold, device-specific value. | ||
@@ -48,2 +48,16 @@ * @param callback - The function that executes when the event fires. The function is passed an BatteryStatusEvent object as a parameter. | ||
isPlugged: boolean; | ||
/* A string that indicates charging type. */ | ||
chargeType: string; | ||
/* A string that indicates the battery technology. */ | ||
technology: string; | ||
/* A number that indicates the battery temperature. */ | ||
temperature: number; | ||
/* A boolean that indicates whether the device is present. */ | ||
present: boolean; | ||
/* The scale of the battery */ | ||
scale: number; | ||
/* integer containing the current battery voltage level. */ | ||
voltageLevel: number; | ||
/* a string indicates Health level */ | ||
currentBatteryHealth: string; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82669
338
140
1