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
9
votes
3 answers

Interpretation of results of "Energy Usage" instrument tool

I am running "energy usage" instrument over ios application using a device, I wanted to use it to check how much battery is getting drained because of the app I am testing. It shows "Energy usage level" which is giving me numbers like 13/20 , 12/20…
Kabs
  • 187
  • 1
  • 6
8
votes
1 answer

How can I get the devices battery level in javascript

I am doing a network call every 15 seconds in my app, and if the users device battery percent is lower than 20%, than I would like to do the call every 30 seconds instead. How do I get the user's devices current battery level? Is it possible? Any…
KingCoder11
  • 415
  • 4
  • 19
8
votes
3 answers

Android BatteryManager Alternatives

I'm trying to get battery stats in my application for some benchmarking. The wonderful BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER lets me query the device's micro-amps which is great. However, this was only introduced in API 21 so the number of…
David M
  • 841
  • 6
  • 23
8
votes
0 answers

Android WifiManager and Scanning Battery Performance

To my understanding, one can request the WifiManager to start an AP scan, which is great and you get scan results back, but my question is regarding the continuous wifi scan that happens under the hood. Aside from unregistering the wifi listener for…
DritanX
  • 753
  • 7
  • 18
8
votes
2 answers

Is OpenGL on Android a battery killer?

I'm currently implementing a software keyboard ( using some sophisticated prediction ), and drawing it using canvas is insufficient in terms of perfomance. I'm getting frame drawing times well above 100ms, which is clearly unacceptable. The keyboard…
moritz
  • 2,448
  • 1
  • 20
  • 25
8
votes
3 answers

How get battery temperature with decimal?

How can i get the battery temperature with decimal? Actually i can calculate it with int temp = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE,0); But in this way the result will be for example 36 °C.. I want something that show me 36.4 °C How…
David_D
  • 1,404
  • 4
  • 31
  • 65
8
votes
3 answers

Obtaining usb cable plugged IN/OUT event using EXTRA_PLUGGED does not work

My intention is to have saved in Preferences current status of Android device usb/power cable: connected/disconnected. From Developer site I see that there are two Intent for obtaining that status: ACTION_POWER_CONNECTED / DISCONNECTED. So I used…
user1128166
  • 131
  • 1
  • 2
  • 4
7
votes
7 answers

Smoothing function for battery voltage display to reduce spikes in embedded system

Reading a battery voltage in an embedded device. However, the actual voltage varies greatly depending upon system load. We need a method to reduce the fluctuation of the voltage to display the best value. Currently, we're using a rolling/moving…
Mike Crowe
  • 2,203
  • 3
  • 22
  • 37
7
votes
3 answers

fcm push notification not working in one plus 6 mobile

FCM push notification is working in following devices properly when the device is in the background, foreground and also when an app is close by swiping from a tray. Brandname (android-Version) Micromax (5.1) Motorola (7.1.1) Nokia …
ashish pandey
  • 1,653
  • 1
  • 10
  • 15
7
votes
3 answers

android open battery settings programically

I'm looking for a way to open the battery settings screen from an android app. So far I found the two intents : Intent.ACTION_POWER_USAGE_SUMMARY Settings.ACTION_BATTERY_SAVER_SETTINGS but none of them open this screen. I was wondering if anyone…
user2679041
  • 241
  • 2
  • 13
7
votes
0 answers

How to get the battery temperature value on ios 10?

I have found this application on App store in which they are showing battery temperature value. Can anyone help me to know how they are doing it?
manishsharma93
  • 1,039
  • 1
  • 11
  • 26
7
votes
5 answers

Get battery level JavaScript

/!\ THE USE OF window.navigator.battery IS STRONGLY DISCOURAGED AND THIS ISSUE IS NOW NOT WORTH CHECKING THANK YOU /!\ I want to get the battery level of the current system. Here is the output I intend to get: If desktop (no battery) Battery level :…
Anwar
  • 4,162
  • 4
  • 41
  • 62
7
votes
0 answers

How can I retrieve my own iOS app battery consumption programmatically?

Is there a public API that I can use to retrieve my own app battery consumption directly in the code like iOS is giving in settings app ? Example of what Apple can provide through settings…
craigzour
  • 123
  • 1
  • 9
7
votes
3 answers

Detailed battery usage - iOS

My current project is a constant-presence application (think Tinder or Foursquare), and the battery consumption is through the roof. We think the main draw on power are the GPS and WiFi antennas. We'd like to be able to measure our app's energy…
7
votes
2 answers

Python script to charge and discharge laptop battery

A friend of mine recently inherited an old laptop and has freshly installed windows 7, and wants to increase the battery life. Initially the battery lasted around 20mins, but by manually allowing the battery to fully discharge before recharging, a…
Cornspierre
  • 322
  • 1
  • 5
  • 14