BatterySpec class

from: com.example.battery_ffi.BatterySpec

Constructors

BatterySpec()
from: public void <init>() The returned object must be released after use, by calling the release method.
factory
BatterySpec.new$1(JObject? context)
from: public void <init>(android.content.Context context) The returned object must be released after use, by calling the release method.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isReleased bool
no setterinherited
jClass → JClass
Returns JClass corresponding to concrete class of this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

as<T extends JObject?>(JType<T> type, {bool releaseOriginal = false}) → T
Casts this object to another type.
inherited
getBatteryCapacity() int
from: public int getBatteryCapacity()
getBatteryHealth() BatteryHealth?
from: public com.example.battery_ffi.BatteryHealth getBatteryHealth() The returned object must be released after use, by calling the release method.
getBatteryLevel() int
from: public int getBatteryLevel()
getBatteryState() BatteryState?
from: public com.example.battery_ffi.BatteryState getBatteryState() The returned object must be released after use, by calling the release method.
getBatteryTemperature() int
from: public int getBatteryTemperature()
getBatteryVoltage() int
from: public int getBatteryVoltage()
getChargingSpeed() int
from: public int getChargingSpeed()
getChargingType() → JString?
from: public java.lang.String getChargingType() The returned object must be released after use, by calling the release method.
getMaxChargingCurrent() int
from: public int getMaxChargingCurrent()
isA<T extends JObject?>(JType<T> type) bool
Whether this object is of the given type ignoring the type parameters.
inherited
isBatteryCapacityFromApi() bool
from: public boolean isBatteryCapacityFromApi()
isChargerConnected() → JBoolean?
from: public java.lang.Boolean isChargerConnected() The returned object must be released after use, by calling the release method.
isChargingCurrentFromApi() bool
from: public boolean isChargingCurrentFromApi()
isChargingSpeedFromApi() bool
from: public boolean isChargingSpeedFromApi()
isInBatterySaveMode() → JBoolean?
from: public java.lang.Boolean isInBatterySaveMode() The returned object must be released after use, by calling the release method.
isInstanceOf(JClass jclass) bool
Whether this object is of the type of the given jclass.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release() → void
Releases the underlying reference.
inherited
releasedBy(Arena arena) → void
Registers this object to be released at the end of arena's lifetime.
inherited
setContext(JObject? context) → void
from: public void setContext(android.content.Context context)
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

acquireWakeLock() → void
from: static public void acquireWakeLock()
getCallbacks() → JList<BatteryStateCallback?>?
from: static public java.util.List<com.example.battery_ffi.BatteryStateCallback> getCallbacks() The returned object must be released after use, by calling the release method.
isWakeLockHeld() bool
from: static public boolean isWakeLockHeld()
registerBatteryCallback(BatteryStateCallback? callback) → void
from: static public void registerBatteryCallback(com.example.battery_ffi.BatteryStateCallback callback)
releaseWakeLock() → void
from: static public void releaseWakeLock()
reset() → void
from: static public void reset()
unregisterBatteryCallback(BatteryStateCallback? callback) → void
from: static public void unregisterBatteryCallback(com.example.battery_ffi.BatteryStateCallback callback)

Constants

nullableType → const JType<BatterySpec?>
The type which includes information such as the signature of this class.
type → const JType<BatterySpec>
The type which includes information such as the signature of this class.