public class Battery
extends java.lang.Object
implements android.os.Parcelable
SBeacon
and EddystoneTLMBeacon
objects keeps a reference to a battery object.
The battery type can only obatained for SBeacon
objects as this information needs to b eread from the connected beacon.
All other values do not require a connection.Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Battery> |
CREATOR |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
BatteryType |
getBatteryType()
Gets the battery type for this battery object
|
double |
getEstimatedPercentRemaining()
Gets the estimated percentage of remaining battery
|
double |
getVoltage()
Gets the current voltage of the battery
|
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel parcel,
int i) |
public static final android.os.Parcelable.Creator<Battery> CREATOR
public BatteryType getBatteryType()
public double getVoltage()
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel parcel, int i)
writeToParcel
in interface android.os.Parcelable
public double getEstimatedPercentRemaining()
public java.lang.String toString()
toString
in class java.lang.Object