public class ActiveDriveInfo extends Object implements Parcelable
The drive may have started manually by the application or due to Zendrive auto drive detection.
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<ActiveDriveInfo> |
CREATOR |
LocationPoint |
currentLocation
The current location of the vehicle.
|
double |
currentSpeed
The current speed of the vehicle in meters/second.
|
double |
distanceMeters
The distance traversed so far in this drive in meters.
|
String |
driveId
An identifier for this drive that was recorded.
|
ZendriveInsurancePeriod |
insurancePeriod
The insurance period in which the drive was detected.
|
String |
sessionId
Session id is optionally specified by the enclosing application when it wants to
record a session.
|
long |
startTimeMillis
The start timestamp of the drive in milliseconds since epoch.
|
String |
trackingId
Tracking id is optionally specified by the enclosing application when it
wants to start a drive manually.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
ActiveDriveInfo()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(Object o) |
int |
hashCode() |
void |
writeToParcel(Parcel dest,
int flags) |
public String driveId
driverId
with which the SDK is initialized.
After the trip ends and is uploaded to Zendrive server, this id can be used as the "trip_id" to query information about a trip from the Zendrive Analytics API.
public long startTimeMillis
public double currentSpeed
public double distanceMeters
@Nullable public LocationPoint currentLocation
@Nullable public String trackingId
This will be null if no tracking id was specified.
@Nullable public String sessionId
This will be null if there is no session is associated with this drive.
@Nullable public ZendriveInsurancePeriod insurancePeriod
public static final Parcelable.Creator<ActiveDriveInfo> CREATOR
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable