Questions tagged [battery]

A battery is a portable electrical power source which is often used in mobile devices.

An electric battery is a device consisting of one or more electrochemical cells that convert stored chemical energy into electrical energy.

Each cell contains a positive terminal, or cathode, and a negative terminal, or anode. Electrolytes allow ions to move between the electrodes and terminals, which allows current to flow out of the battery to perform work.

871 questions
4
votes
1 answer

iOS Application for Check Battery level in background

Is it possible to check battery level while our application is in background? Currently I am working on one iOS application in which user will be alerted when battery reached to certain level. I have searched on google/stake overflow . but find none…
iRoid Solutions
  • 415
  • 6
  • 20
4
votes
2 answers

C# technique for determining if a computer is operating on battery power?

I've found a number of API's that can help determine how much charge (percentages, charge estimates, etc) - mostly in WMI in my application, I'd like to know if the computer is currently powered by battery, not the status of the battery. in short,…
stuck
  • 2,264
  • 2
  • 28
  • 62
4
votes
3 answers

PhoneGap Build application doesn't fire battery-related events

I have a phonegap-bootstrap project at GitHub -- a demo application, written in PhoneGap 2.9. I've placed event handlers for every event supported by PhoneGap. All of them fires without any problems, except for battery-related events. I was more…
trejder
  • 17,148
  • 27
  • 124
  • 216
4
votes
1 answer

BatteryManager Health values

I was wondering about the value that I get from the BatteryManager when I want to have the health. I get a "2". What does it mean? Can anyone give me all the values I can get and their meanings? Here is my code for what I want: int health =…
Phil
  • 57
  • 8
4
votes
1 answer

In Android, is there a way to get the battery current?

The BatteryManager class doesn't have the metric for current: http://developer.android.com/reference/android/os/BatteryManager.html And then I have found this post: Getting the battery current values for the Android Phone It seems that the author…
Hao Shen
  • 2,605
  • 3
  • 37
  • 68
4
votes
3 answers

Get battery level in Java

I would like to make a java app that shows the current battery level of my mac OS X. I have read get OS-level system information and was wondering how I could modify this to make it display the current % of battery Thanks
Alex
  • 41
  • 1
  • 2
4
votes
1 answer

Get the Battery status on windows 8

I searched over the Internet and the only thing that I found a little bit helpful was the way to get Battery status on Windows Phone 8. But I want it on Windows 8 (RT). Can anyone help me out?
Peyman
  • 3,059
  • 1
  • 33
  • 68
4
votes
1 answer

core location distance filter battery life

Does changing the distanceFilter value have any effect on battery life? If so what is this effect and why should it have any effect?
Jeff Ames
  • 1,555
  • 11
  • 27
4
votes
5 answers

How to obtain extensive battery info in iOS?

I'm wondering is it possible to receive information about battery like: capacity (mA), voltage (V), cycle count within iOS? I know UIDevice class, but battery level is not what I'm looking for.
Wojciech Rutkowski
  • 11,299
  • 2
  • 18
  • 22
4
votes
1 answer

ContentObserver vs. BroadCastReceiver : Battery Usage, Ram, CPU?

Since there is such a needed concern for an application's battery usage, ram and cpu usage, what is the expense of multiple contentobservers vs. multiple broadcastreceivers? Example 1: A service running with START_STICKY using 5 contentobservers …
ThumbsDP
  • 543
  • 6
  • 18
4
votes
3 answers

Polling ACTION_BATTERY_LOW

When the battery gets low, Android will send an ACTION_BATTERY_LOW intent. Then when it's okay again, it sends ACTION_BATTERY_OKAY. Unfortunately if my application is started while the battery is low, then I don't get sent the intent; it's not…
David Given
  • 13,277
  • 9
  • 76
  • 123
4
votes
2 answers

How to find the battery recharge time of android mobile programatically?

I wanted to know that how can we find how much time android device will take to fully charge its battery. For example if my battery is 0% charged then how long it will take to charge full i.e. 100%, same if my device is 70% charge so if i connect…
user1346836
  • 147
  • 1
  • 3
  • 12
3
votes
2 answers

Toggle iPhone Charging through OS X or XCode

I'm currently writing an iOS application and am receiving battery status change notifications. Of course, when I'm debugging my app it would be nice if I could toggle the battery status without unplugging my phone. Is there any way to do this via…
Joe
  • 2,352
  • 20
  • 38
3
votes
1 answer

android widget stop update the code after few hours?

I am working on a battery widget, so when ever Intent.ACTION_BATTERY_CHANGED occurs it is received by widget onReceive() method from where I can get its data now the problem is this, that this whole procedure goes find fine but when time passes…
mfq
  • 1,357
  • 13
  • 21
3
votes
1 answer

How to create a Battery Badge that shows current Battery Level in SwiftUI

What I want to do is almost identical to the badge on MacOS and iOS devices I tried to use SFSymbols for this but it only supports %0, %25, %50, %75 and %100 but I want to update my battery badge to the current battery level. I've tried to use…
user20346906