这是indexloc提供的服务,不要输入任何密码
Skip to content

Built-in BATTERY_PROPERTY_CAPACITY and BATTERY_PROPERTY_CHARGE_COUNTER #630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Wetitpig
Copy link
Contributor

@Wetitpig Wetitpig commented Nov 1, 2023

BATTERY_PROPERTY_CHARGE_COUNTER can be multiplied with EXTRA_VOLTAGE in #623 to obtain the remaining battery energy, while BATTERY_PROPERTY_CAPACITY is available since API level 21, without requiring Termux to calculate the battery percentage by itself.

`BATTERY_PROPERTY_CHARGE_COUNTER` can be multiplied with `EXTRA_VOLTAGE` in another pull request to obtain the energy level, while `BATTERY_PROPERTY_CAPACITY` can be obtained since API level 21 without doing the calculation by Termux itself.
agnostic-apollo added a commit that referenced this pull request Jan 12, 2025
…_avg`, `level`, `scale`, `charge_counter`, `energy` and `cycle` properties to battery API

Fix `BATTERY_PROPERTY_CURRENT_NOW` unit if required.

Use `percentage` returned by `BATTERY_PROPERTY_CAPACITY` instead of using scale and level as suggested by @Wetitpig in #630
@agnostic-apollo
Copy link
Member

Closed by d5364ef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants