Questions tagged [batterymanager]

The BatteryManager class contains strings and constants used for values in the ACTION_BATTERY_CHANGED Intent.

The BatteryManager class contains strings and constants used for values in the ACTION_BATTERY_CHANGED Intent.

130 questions
1
vote
1 answer

Can someone please explain Android BatteryManger parameters

I am confused about the Battery Manager Parameters. can someone please explain below points: BATTERY_PROPERTY_CHARGE_COUNTER - Battery capacity in microampere-hours, as an integer. Ques - Is it the remaining battery capacity or total battery…
kukroid
  • 420
  • 6
  • 15
1
vote
0 answers

Display Type of Charge

My Code Has 4 Different textviews that display 4 different text, the first 3 display True or false and the last one shows the % of battery 1 Battery charging 2 Battery UsbCharge 3.Battery AcCharge 4.Battery Life I Have The battery life working but…
user3215990
  • 53
  • 1
  • 1
  • 11
1
vote
0 answers

Accessing battery info

I seem to not find any documentation about android service wrappers and I'm stuck with "use of undeclared identificator "TJBatteryManager". #include #include #include…
IDS
  • 79
  • 10
1
vote
2 answers

Facing "Excessive Wi-Fi Scanning in the Background" issue in app

google play store monitor the bad behavior of Excessive Wi-Fi Scanning in the Background. not able to identify the issue i have add bellow permission in manifest please…
sachin c
  • 33
  • 1
  • 5
1
vote
2 answers

Determine if Android battery is currently LOW

I'm aware that I can register a BroadcastReceiver for ACTION_BATTERY_LOW and ACTION_BATTERY_OKAY which will notify my app when this battery LOW state changes, but how can I determine if the battery is currently LOW or OKAY? BatteryManager may allow…
HolySamosa
  • 9,011
  • 14
  • 69
  • 102
1
vote
1 answer

Can I write a c program that actually alerts about my laptop battery?

Is it possible to write in C to get the alert. If yes, what is the concept to be applied to get an alert when my battery goes down by 40% or gets high to 80%?
Anandh Kishan
  • 75
  • 1
  • 9
1
vote
0 answers

ACTION_BATTERY_CHANGED does not update EXTRA_STATUS of device

I am using ACTION_BATTERY_CHANGED intent-filter to receive broadcast messages from android. I am using following code IntentFilter batteryLevelFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); Intent batteryStatus =…
Rajeev Kumar
  • 4,901
  • 8
  • 48
  • 83
1
vote
1 answer

Measure battery drain for a specific App or package name using ADB Commands

Measure battery drain using ADB commands for a specific package name. Battery stats for the package name since the last charge to the android device. To measure performance of the device or to automate the non-functional testing for your…
Siva
  • 1,078
  • 4
  • 18
  • 36
1
vote
0 answers

Battery charging status is always null

While following the Android documentation for monitoring changes in battery status, I came across this:
Ventis
  • 488
  • 6
  • 22
1
vote
0 answers

How can I get the value of charging current (in mA) on android API level 16?

BatteryManager provides an API to get the current charging or drawn using the BATTERY_PROPERTY_CURRENT_NOW property. However the min SDK level for this API is 21. I have seen some working apps that are compatible with API 16 devices and the…
1
vote
1 answer

android - What's the unit of battery current value?

Following this question, what's the unit found on the /sys Battery Current file? The values I get are usually between 300000 and 800000. I'm currently using a Motorola Moto G 2nd Generation (XT1068) and the Battery Current file is on…
Minoru
  • 1,680
  • 3
  • 20
  • 44
1
vote
1 answer

Cordova plugins for application

Is there any mechanism to check the battery usage and network usage by a particular app on IOS. Do we have any Cordova plugin for these native features.
1
vote
2 answers

Get battery informations from android device

I try to get some informations about the android device battery like actual current, voltage,... I succeed to get voltage, level, ... but unfortunately I have a phone which run with API 16 and the parameter…
jretornaz
  • 21
  • 1
  • 3
1
vote
2 answers

Detect when Power Cable disconnected(USB or AC Charger) in Android programmatically

BroadcastReceiver mBatteryReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1); …
D'yer Mak'er
  • 1,632
  • 5
  • 24
  • 47
1
vote
0 answers

Not getting updated Battery State in BroadcastReceiver [android]

I have a broadcast receiver for ACTION_POWER_CONNECTED registered in manifest. When I connect power this is getting invoked and onReceive is working just fine. In onReceive i am retrieving battery charging status using method given in google docs as…
Jay K
  • 23
  • 1
  • 6
1 2 3
8 9