apache / cordova-plugin-battery-status Goto Github PK
View Code? Open in Web Editor NEWApache Cordova Battery Status Plugin
Home Page: https://cordova.apache.org/
License: Apache License 2.0
Apache Cordova Battery Status Plugin
Home Page: https://cordova.apache.org/
License: Apache License 2.0
unfortunately, this plugin creator @apache , did fantastic work, and we highly appreciate him not maintaining this plugin anymore (not responding for a while).
we moved to a maintained plugin (which forked from this one) to here:
https://github.com/EYALIN/community-cordova-plugin-battery-status
you can install it as an npm package:
cordova plugin add community-cordova-plugin-battery-status --save
The browser implementation of this plugin uses navigator.getBattery
:
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery
Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Current Firefox and Edge don't support it, Chrome still seems to:
https://developer.mozilla.org/en-US/docs/Web/API/Battery_Status_API#Browser_compatibility
As far as I know there is no proper replacement.
In our Ionic project after installing cordova-plugin-firebase the battery-status loses its functionality.
But when we remove cordova-plugin-firebase it work fine.
Will be appreciated if you can help in this regard.
more info :
cordova -v -> 8.0.0
The plugging isn't working on iOS devices, the code haven't been update after 7 years
Its suppose to show the battery status
Doesn't show anything, no even a simple console log in the function
node v12.16.1
npm 6.13.4
ionic CLI 6.0.2
here my simple code
this.batteryStatus.onChange().subscribe(status => {
console.log("Estado Bateria");
console.log(status.level, status.isPlugged);
this.batteryText = status.level;
this.cdr.detectChanges();
});
We get this error below after started to use Android 7.x. We read the documentation (https://cordova.apache.org/announcements/2017/12/04/cordova-android-7.0.0.html) bu we still have no solution. Can you help us, please ?
Installing "cordova-plugin-battery-status" for android
Failed to install 'cordova-plugin-battery-status': Error: ENOENT: no such file or directory, open '/Users/apple/Desktop/simplyPOD/platforms/android/AndroidManifest.xml'
I want to check when the device is plugged in. Is there a way to check if the fired event is because of a level change or the plugging in?
this plugin not working with capacitor in ios.
its works only in android not in ios
on plug and unplug events should trigger
Instead of maintaining this plugin only for me, I published a new maintained plugin called "community-cordova-plugin-battery-status" (https://github.com/EYALIN/community-cordova-plugin-battery-status) which is maintained and will keep being.
please feel free to use it, and write me any feedback.
can be installed by using "cordova plugin add community-cordova-plugin-battery-status"
all Android and IOS recent issues are fixed there.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.