Questions tagged [batterylevel]

The amount of charge remaining in the battery of a portable electronic device

The battery level of a portable electronic device is a reflection of the amount of charge remaining in the portable battery of that device. This is an indication as to how long the device can last without being plugged into a power source before shutting down.

262 questions
2
votes
0 answers

Get Bluetooth Device Battery Level

I decided to build a tool to display the battery level of a pair of Bluetooth headphones, since I got this feature on Android, but not on Windows. For some reason, it just doesn't display in the settings. I'm using UWP and with the Device Enumerator…
2
votes
0 answers

Apple watchOS 6.1 isBatteryMonitoringEnabled is not being set to true

Swift nube here with Swift 5 on Xcode 11. I am simply trying to get the status of my battery. To do this I know I need to enable/set "isBatteryMonitoringEnabled" to true. I enter the following line: …
HirsuteJim
  • 529
  • 4
  • 13
2
votes
0 answers

Web battery API working very slow on Android

I have made a battery level monitor using web programming languages. Here is my code : if('getBattery' in navigator) { navigator.getBattery().then(function get(battery) { var l=Math.round(battery.level*100); var d=document.…
Puspam
  • 2,137
  • 2
  • 12
  • 35
2
votes
3 answers

How can we overwrite navigator.getBattery()?

We are writing a chrome extension that returns a random battery level when the battery level is checked by a site running client-side code for fingerprinting reasons. Sample code that can be used by a site can be seen…
2
votes
0 answers

Native API not changing in html and don't work with livereload

i'm connecting Ionic cordova to my physical device with USB and command : ionic cordova run android --livereload. Thats the using this code to get the BatteryStatus: export class HomePage { batterystatus$: number; subscription : any; …
Bruno Cerk
  • 355
  • 3
  • 16
2
votes
0 answers

How to check the Battery Health on iOS 10 and above version.

I'm using IOKit framework to check the battery health (not battery level), and I'm able to get the exact data as coconut battery app shows. Can someone let me know will App Store allow the app to publish if we use IOKit.
Praveen B
  • 71
  • 4
2
votes
2 answers

How to create a battery level indicator in android?

I want to create a battery level indicator as in the image(which i circled). The green part should fill based on the available battery in the device. Getting the battery percentage from the device like this registerReceiver(mBatInfoReceiver, new…
Anuraj R
  • 524
  • 2
  • 8
  • 24
2
votes
1 answer

Get Individual App Battery Usage iOS

I want to know if there is any way I can get the percentage of battery usage for each app used by the user in iOS using Swift 2. It is like in Settings > Battery and there will be a battery usage group. Please help
Palash Sharma
  • 662
  • 1
  • 10
  • 18
2
votes
1 answer

How do apps like iBetterCharge and coconutBattery work?

I've been using iBetterCharge for some time and I quite like it. Except the fact that sometimes it's annoying with its loud warning sound. Anyway, I'm wondering how do apps like iBetterCharge and coconutBattery work? I mean how do they read iPhone…
itopaloglu83
  • 216
  • 1
  • 5
2
votes
1 answer

Android: How to get Battery level status more accurately?

I want to get android battery info with more accuracy. I've found some code which gives battery level and scale but it isn't helping me out much. int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); int scale =…
2
votes
3 answers

How to get current battery percentage?

I'm creating a battery monitor application, and I'm trying to display the current battery percentage. I have a broadcastreceiver, that is listening for... In the receiver I have the…
ENG618
  • 1,012
  • 1
  • 13
  • 31
2
votes
1 answer

Get Battery Level

I'm trying to get Battery state. I use this code : public class BatteryLevelReceiver extends BroadcastReceiver { SharedPreferences prefs; int scale = -1; int level = -1; @Override public void onReceive(Context context, Intent intent) { prefs =…
Juliatzin
  • 18,455
  • 40
  • 166
  • 325
2
votes
3 answers

Android: Start Service at certain Battery Level

I want to start an IntentService if the battery level reaches a certain value while charging. However, I dont want to register a BroadcastReceiver for android.intent.action.BATTERY_CHANGED in the AndroidManifest.xml because i need the service only…
emareg
  • 23
  • 5
2
votes
1 answer

How can we calculate/ to know, how much battery life my user defined application utilising?

Here my question is, can we identify, how much battery life my android application is utilising. Because I developed an app based on GPS as well as network, service, broadcast receivers, so I have battery drain problem, so first of all i want to…
user3285681
  • 230
  • 3
  • 12
2
votes
0 answers

reading power levels from a charging battery via USB in C#

I have had a little experience with USB communication via C#.My question today is this. Is there a way to find the % or otherwise level of a battery connected via USB? I am designing an application to check the charge in a battery that charges via a…
MarkFW
  • 21
  • 1