public class Event
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Event> |
CREATOR |
static java.lang.String |
TYPE |
Constructor and Description |
---|
Event(EventType type,
java.lang.String uniqueId,
int batteryPower,
long timestamp) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
int |
getBatteryPower() |
long |
getTimestamp() |
EventType |
getType() |
java.lang.String |
getUniqueId() |
static Event |
of(RemoteBluetoothDevice device,
EventType eventType) |
static org.json.JSONArray |
toJSONArray(java.util.List<Event> monitoringEvents) |
static org.json.JSONObject |
toJSONObject(Event event) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<Event> CREATOR
public static final java.lang.String TYPE
public Event(EventType type, java.lang.String uniqueId, int batteryPower, long timestamp)
public static Event of(RemoteBluetoothDevice device, EventType eventType)
public long getTimestamp()
public int getBatteryPower()
public java.lang.String getUniqueId()
public EventType getType()
public static org.json.JSONObject toJSONObject(Event event)
public static org.json.JSONArray toJSONArray(java.util.List<Event> monitoringEvents)
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable