All Projects → apache → cordova-plugin-battery-status

apache / cordova-plugin-battery-status

Licence: Apache-2.0 license
Apache Cordova Plugin battery-status

Programming Languages

javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language
C#
18002 projects

Projects that are alternatives of or similar to cordova-plugin-battery-status

Awesome Ionic2 Components
Should help you to get awesome components and plugins for Ionic2
Stars: ✭ 209 (+122.34%)
Mutual labels:  cordova
Cordovacn
Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, avoiding each mobile platforms' native development language. (Apache Cordova是一个开放源代码的移动开发框架,它允许你使用web技术如:JavaScript,HTML,CSS进行跨平台开发,避免使用原生开发。)
Stars: ✭ 240 (+155.32%)
Mutual labels:  cordova
capacitor-rate-app
Let users rate your app using native review app dialog for both Android and iOS.
Stars: ✭ 88 (-6.38%)
Mutual labels:  cordova
Taxi Booking App
This is a complete ride booking app, It uses google maps cordova plugin, firebase database and onesignal as notification provider.
Stars: ✭ 212 (+125.53%)
Mutual labels:  cordova
Cordova Osx
Apache Cordova mac
Stars: ✭ 232 (+146.81%)
Mutual labels:  cordova
Cordova Plugins
Apache Cordova
Stars: ✭ 242 (+157.45%)
Mutual labels:  cordova
Wooionic3
An eCommerce App for WooCommerce stores using Ionic 3.
Stars: ✭ 208 (+121.28%)
Mutual labels:  cordova
cordova-plugin-android-window-background
Simple Cordova plugin to set Android window background on start-up 🎨 🍭
Stars: ✭ 15 (-84.04%)
Mutual labels:  cordova
Cordova Plugin Fingerprint Aio
👆 📱 Cordova Plugin for fingerprint sensors (and FaceID) with Android and iOS support
Stars: ✭ 236 (+151.06%)
Mutual labels:  cordova
ILIAS-Pegasus
An ILIAS Companion App
Stars: ✭ 19 (-79.79%)
Mutual labels:  cordova
Onesignal Cordova Sdk
OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Ionic, PhoneGap CLI, PhoneGap Build, Cordova, or Sencha Touch app with OneSignal. Supports Android, iOS, and Amazon's Fire OS platforms. https://onesignal.com
Stars: ✭ 214 (+127.66%)
Mutual labels:  cordova
Cordova Ionic Phonegap Branch Deep Linking Attribution
The Branch Cordova Ionic Phonegap SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
Stars: ✭ 228 (+142.55%)
Mutual labels:  cordova
Swiped Events
Adds `swiped` events to the DOM in 0.7k of pure JavaScript
Stars: ✭ 249 (+164.89%)
Mutual labels:  cordova
Cordova Plugin Touch Id
💅 👱‍♂️ Forget passwords, use a fingerprint scanner!
Stars: ✭ 209 (+122.34%)
Mutual labels:  cordova
cordova-fonts
Cordova plugin for enumerating fonts on a mobile device
Stars: ✭ 14 (-85.11%)
Mutual labels:  cordova
Cordova Lib
Apache Cordova Tooling Library
Stars: ✭ 208 (+121.28%)
Mutual labels:  cordova
Ews Javascript Api
EWS API for TypeScript/JavaScript - ported from OfficeDev/ews-managed-api - node, cordova, meteor, Ionic, Electron, Outlook Add-Ins
Stars: ✭ 241 (+156.38%)
Mutual labels:  cordova
framework7-plugin-keypad
Keypad plugin extends Framework7 with additional custom keyboards
Stars: ✭ 72 (-23.4%)
Mutual labels:  cordova
ionic3-whatsappclone
This is a template for WhatsApp for user with ionic framework. It's just a template with no backend for now. See Roadmap in Readme below
Stars: ✭ 24 (-74.47%)
Mutual labels:  cordova
haoshiyou-client
Source code for haoshiyou clients (Hybrid HTML5 App)
Stars: ✭ 14 (-85.11%)
Mutual labels:  cordova
title description
Battery Status
Get events for device battery level.

cordova-plugin-battery-status

Android Testsuite Chrome Testsuite iOS Testsuite Lint Test

This plugin provides an implementation of an old version of the Battery Status Events API. It adds the following three events to the window object:

  • batterystatus
  • batterycritical
  • batterylow

Applications may use window.addEventListener to attach an event listener for any of the above events after the deviceready event fires.

Installation

cordova plugin add cordova-plugin-battery-status

Status object

All events in this plugin return an object with the following properties:

  • level: The battery charge percentage (0-100). (Number)
  • isPlugged: A boolean that indicates whether the device is plugged in. (Boolean)

batterystatus event

Fires when the battery charge percentage changes by at least 1 percent, or when the device is plugged in or unplugged. Returns an object containing battery status.

Example

window.addEventListener("batterystatus", onBatteryStatus, false);

function onBatteryStatus(status) {
    console.log("Level: " + status.level + " isPlugged: " + status.isPlugged);
}

Supported Platforms

  • iOS
  • Android
  • Windows
  • Browser (Chrome, Firefox, Opera)

Quirks: Android

Warning: the Android implementation is greedy and prolonged use will drain the device's battery.

batterylow event

Fires when the battery charge percentage reaches the low charge threshold. This threshold value is device-specific. Returns an object containing battery status.

Example

window.addEventListener("batterylow", onBatteryLow, false);

function onBatteryLow(status) {
    alert("Battery Level Low " + status.level + "%");
}

Supported Platforms

  • iOS
  • Android
  • Windows
  • Browser (Chrome, Firefox, Opera)

batterycritical event

Fires when the battery charge percentage reaches the critical charge threshold. This threshold value is device-specific. Returns an object containing battery status.

Example

window.addEventListener("batterycritical", onBatteryCritical, false);

function onBatteryCritical(status) {
    alert("Battery Level Critical " + status.level + "%\nRecharge Soon!");
}

Supported Platforms

  • iOS
  • Android
  • Windows
  • Browser (Chrome, Firefox, Opera)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].