@dderevjanik/termux-api
Version:
This library allows you to interact with your Android device from Node.js using termux-api
37 lines (36 loc) • 792 B
TypeScript
export interface BatteryStatus {
/**
* The health of the battery.
* @example "GOOD"
*/
health: string;
/**
* The percentage of battery remaining.
* @example 73
*/
percentage: number;
/**
* The plugged status of the battery.
* @example "UNPLUGGED"
*/
plugged: string;
/**
* The charging status of the battery.
* @example "DISCHARGING"
*/
status: string;
/**
* The temperature of the battery in degrees Celsius.
* @example 21.0
*/
temperature: number;
/**
* The current battery current in microamperes.
* @example 691537
*/
current: number;
}
/**
* Get the status of the device battery
*/
export declare function batteryStatus(): Promise<BatteryStatus>;