There are dozens of questions related to fine-grained power monitoring in Android. Many of these use external tools and, as far as I can tell, it just isn't feasible yet to do so from within your average app. Is there any way to access the coarse grained value from the SDK instead? Android shows it in battery settings, e.g., "MyApp: 30%", but can apps directly read that value?

有帮助吗?

解决方案

Android shows it in battery settings, e.g., "MyApp: 30%", but can apps directly read that value?

Not through the Android SDK. There's probably a way to get that from some Linux /proc entry, but I don't know off the top of my head how.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top