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
1 answer

/sys/class/power_supply/battery VS. BatteyManager

As far as i understand, there are 2 ways to read battery status: 1) Register a broadcast receiver on "ACTION_BATTERY_CHANGED" and get the values from the Intent using BatteryManager fields. 2) Read values directly from sysfs battery files. My…
2
votes
0 answers

are we able to get precise battery level in android?

I'm aware that this question was asked before. but the answer redirected to Battery Manager API. What I was hoping for was a method to know the draining rate per second. any of you guys know how to get the draining rate per second? I understand…
Ak-
  • 335
  • 4
  • 17
2
votes
2 answers

Get battery status using wmi in python?

I know how to use wmi, I have used it before, however, the wmi class it seems i need to call is GetSystemPowerStatus. but i am having trouble finding and documentation on it. to be able to access it, i need to know the namespace, and the format of…
ryan27968
  • 437
  • 3
  • 7
  • 14
2
votes
1 answer

Android Development: How do I predict expected battery life based on current battery level?

I have a requirement of predicting the battery duration from within my android app. I have the cpu data, memory information and current battery level. I have also plotted graphs of these values over the past few minutes using the AndroidPlot…
Arun Kumar
  • 101
  • 2
  • 10
2
votes
2 answers

How to determine time since last charge

How can I determine programmatically the last time I charged my phone? What I'm looking for is something that in a TextView called time shows me: Last time on charge: 3h ago and of course if is charging will be Last time on charge: 0h ago or…
David_D
  • 1,404
  • 4
  • 31
  • 65
2
votes
1 answer

Battery State Always Returning Null

I have the method below that returns the battery charge level correctly but does not get the battery state. It always returns UNKNOWN. -(NSString *)batteryStatus { UIDevice *device = [UIDevice currentDevice]; NSString *batteryStateString =…
motionpotion
  • 2,656
  • 6
  • 42
  • 60
2
votes
2 answers

Battery Usage - IOS

I want to show battery usage of the app on the status bar of the app. It uses GPS, so GPS signal and details of battery usage by app would be useful for the users about the battery drain. Is there a way to get the battery usage from the device? and…
Manoj
  • 1,482
  • 2
  • 20
  • 53
2
votes
1 answer

Is there a system variable that holds the device-specific low-battery threshold for Android?

I am checking to see if the battery has reached critical level. Android sends an intent to your app when the battery crosses the low-battery threshold in either direction. But this only works if the threshold is crossed while your app is running…
BeccaP
  • 1,452
  • 1
  • 13
  • 19
2
votes
1 answer

Significance of EXTRA_LEVEL in Android BatteryManager class

What does the value of EXTRA_LEVEL for the BatteryManager class in Android signify? I am trying to understand exactly what does a change of 1% in the level signify. For example for the Galaxy Nexus battery capacity is 1750 mAh. Does that mean, that…
docpkd
  • 551
  • 9
  • 19
2
votes
2 answers

Android battery drain - application design

I am designing an Android application that needs to receive constantly changing information (so the update interval must be very small). Right now I am reading this information by consuming a REST WebService, but I am wondering if this is the best…
pteixeira
  • 1,617
  • 3
  • 24
  • 40
2
votes
0 answers

Battery Monitoring updates at uneven intervals

I am monitoring for battery events UIDeviceBatteryLevelDidChangeNotification and UIDeviceBatteryStateDidChangeNotification. I am looking specifically for 20% and 10%, however, I am seeing these events fire off at 23%, 13% which they should be…
WrightsCS
  • 50,551
  • 22
  • 134
  • 186
1
vote
1 answer

how to get battery level of the dji remote controller in android app (built using android studio - java)?

with the code below i am able to retrieve serial number of the dji drone remote controller. however, I cannot get battery level. is there anyway I can retrieve battery level? please advise. the code for serial number (which is fine): public void…
Shareef
  • 53
  • 2
  • 13
1
vote
2 answers

navigator.getBattery cannot be found

I made a program that would list the battery level and charging into a div. My code is below. For some reason, when I run it, it tells me that navigator.getBattery is not a function. How can I fix this? function batttick() { …
lolBOT V9.17
  • 141
  • 10
1
vote
0 answers

How to avoid Android application UI changes on low battery level?

I'm developing an Android application according to provided UI. The UI is in bright colors and everything works well. But when the battery level goes low the battery saver regime turns on and the UI in my application turns dark and some texts become…
Evgeniy Mishustin
  • 3,343
  • 3
  • 42
  • 81
1
vote
1 answer

Show battery level of connected bluetooth device [Kotlin]

Is it possible to show the battery level of a connected bluetooth device? I'm making an app that monitors devices and it connects thru bluetooth. I know how to show current batterylevel of the monitor (in this case a tablet), but I'm not sure if…