question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add methods to get and set the battery details

See original GitHub issue

@imurchie commented on Fri Jan 29 2016

How much control we want to give is up in the air.

Getting the status:

👻 ➤ adb shell dumpsys battery
Current Battery Service state:
  AC powered: true
  USB powered: false
  Wireless powered: false
  status: 2
  health: 2
  present: true
  level: 89
  scale: 100
  voltage: 0
  temperature: 0
  technology: Li-ion

Setting the status:

👻 ➤ adb shell dumpsys battery set
Dump current battery state, or:
  set ac | usb | wireless | status | level | invalid <value>

@filmaj commented on Fri Jan 29 2016

+1 !


@SrinivasanTarget commented on Tue Feb 09 2016

+1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jlippscommented, Jul 21, 2017
0reactions
lock[bot]commented, Apr 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show the battery percentage on your iPhone or iPad
Go to Settings > Battery, and turn on Battery Percentage. ... Another quick way to check your battery percentage is to add the...
Read more >
How to Add Battery Percentage to Widgets - YouTube
Did you remove the battery Widget and have no clue how to put it back? Learn to add the Widget and the various...
Read more >
iPhone iOS 14+: How to Add Battery Widget to Home Screen
I show you how to add the battery widget on the home screen of your iPhone that has iOS 14 or above. Hope...
Read more >
Add the battery icon to the taskbar in Windows 10
Under Batteries, right-click the battery for your device, select Disable, and select Yes. Wait a few seconds, and then right-click the battery and...
Read more >
Get battery level and state in Android - Stack Overflow
About Intent.ACTION_BATTERY_CHANGED: This is a sticky broadcast containing the charging state, level, and other information about the battery. You can not ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found