svartalf / rust-battery

Rust crate providing cross-platform information about the notebook batteries.
https://crates.io/crates/battery
Apache License 2.0
354 stars 40 forks source link

Android support #59

Closed CliffHan closed 4 years ago

CliffHan commented 4 years ago

I tried to add android support with same configuration as "target_os=linux", and it works.

Please add android support.

svartalf commented 4 years ago

While it might work on some devices, in a whole accessing battery state on Android via sysfs is unreliable for many reasons, see https://issuetracker.google.com/issues/37095733

Due to this fact, I'm prefer to decline #60 till we will get an official way to get battery information on the NDK level without Java/Kotlin/etc middleware.

CliffHan commented 4 years ago

I see, thanks for your explanation.