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

How to get light sensor value and battery level anytime for android?

I am writing a program and I am able to get the light sensor value and current battery level, but only the light value changes and when the battery level changes. Is there a way to get these two values anytime? Like when a user runs my program, I…
John
  • 31
  • 1
  • 2
3
votes
1 answer

making constant internet connection to server without draining battery

Apps like twitter drain phone's battery quickly as it have to wake up the phone when a new tweet comes. My app need constant connection to server. It won't download or upload data constantly.sending TCP keep-alive every 2 minutes can save battery…
3
votes
2 answers

Can't change battery configuration in Android Emulator

I'm trying to change in my emulator the battery status as capacity and ac status but isn't working. I made the whole steps: 1) Connected to the emulator via telnet; 2) Tried to use the commands such power ac off and power capacity 70 3) Every time I…
bgomes06
  • 99
  • 2
  • 11
3
votes
1 answer

How do Android and iOS scan for Bluetooth beacons without battery issues?

if i want to develop own my iBeacon services in Android or IOS, it has to be practical. which means customer can use my services without shortage of battery. i think even if iBeacon technology is based on Bluetooth Low Energy, it could be still lack…
ctrlcnv
  • 43
  • 5
3
votes
1 answer

Obtain CMOS Battery Status Info on Windows

How can I obtain CMOS Battery Status Info on Windows, preferably with PowerShell or VBScript (or some other easy method) I am expecting the likely alternatives include Performance Counters or more likely WMI. Assume fairly recent Windows computers…
HerbM
  • 521
  • 6
  • 14
3
votes
2 answers

Replacing the battery indicator (Android)

There's an open source battery indicator that I greatly prefer to the default one. I was wanting to modify it to replace the default battery indicator. Is this even possible without building a whole custom ROM?
Jeremy Logan
  • 47,151
  • 38
  • 123
  • 143
3
votes
2 answers

"Force stop" on new android application

I recently finished up my very first app on Android and had a pretty basic question that I can't seem to find an answer on. Like with most apps, when one is installed on your phone, it will show up in the Settings -> Applications list. The app I…
John Octavious
  • 221
  • 1
  • 3
  • 9
3
votes
3 answers

How and when does the Android system send the ACTION_BATTERY_CHANGED sticky broadcast?

My goal is : when I call some function, I want to get the exact current battery status(level,voltage and etc..). First I tried to do it in my application as shown on the website. Then I have found actually the ACTION_BATTERY_CHANGED broadcast is…
Hao Shen
  • 2,605
  • 3
  • 37
  • 68
3
votes
1 answer

How can I simulate battery drain on an android phone in a controlled fashion?

I want an app that drains the battery by using the CPU resources in a controlled fashion. Her, by controlled fashion, what I meant to say is that let's say 'X units/ms' is the maximum amount of the battery drain rate and the 'Y units/ms' is the…
VoodooChild92
  • 1,993
  • 3
  • 19
  • 24
3
votes
1 answer

securityexception when trying to get battery level

When trying to receive the battery level I get a securityException. Code: Intent batteryIntent = m_Context.getApplicationContext().registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); m_iRawLevel =…
zwebie
  • 2,349
  • 1
  • 27
  • 43
3
votes
3 answers

Obtain Battery temperature in IOS programatically

How can I obtain the temperature of the Battery in IOS programatically. Also are there any API's in IOS that would give us any information on the Battery Manufacturer etc. Currently I am able to obtain the Battery level and charging status . Wanted…
sim
  • 249
  • 7
  • 17
3
votes
3 answers

Detecting Battery Charging Android

I;m programmatically rejecting an incoming calls. The "call reject" and "sendSMS" work fine, but I want to reject the call only if the phone is in charging mode. I'm trying to implement the following code : case…
OlejkaKL
  • 521
  • 1
  • 9
  • 23
3
votes
1 answer

Best practice to implement location based service in iOS

What is the best (meaning least power consumption) way to use some location based service in an iOS application? E.g. checking the position in the background every x sec/min. I've read about geofencing, but I'm not familiar with it in detail (how…
Awinad
  • 99
  • 1
  • 7
3
votes
2 answers

How to analyise battery usage of android application and optimize it?

I would like to analyze battery usage of my application, I mean the parts of the app, such as broadcastreceivers, listeners, services, etc.., how much battery uses. I need a detailed list, and from the list, I would like to optimize battery…
ba-res-ba
  • 150
  • 1
  • 9
3
votes
1 answer

Set laptop battery max charge level

I am fond of making a program which will be used for laptops in order to keep a max charging threshold for the battery. It is well known that preventing laptop battery from getting to the maximum or lowest level increases life of the battery. Is…
bokarinho
  • 193
  • 1
  • 1
  • 6