public class DriveInfo extends Object implements Parcelable
The drive may have started manually by the application or due to Zendrive auto drive detection.
Modifier and Type | Class and Description |
---|---|
static class |
DriveInfo.Warning
Enum representing warnings detected for the current drive.
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
double |
averageSpeed
The average speed of the drive in meters per second.
|
static Parcelable.Creator<DriveInfo> |
CREATOR |
double |
distanceMeters
The total distance of the drive in meters.
|
String |
driveId
An identifier for this drive that was recorded.
|
ZendriveDriveType |
driveType
The type of drive.
|
long |
endTimeMillis
The end timestamp of the drive in milliseconds since epoch.
|
ZendriveEventRatings |
eventRatings
Ratings associated with various
event types for this drive. |
ArrayList<ZendriveEvent> |
events
A list of
events detected by the sdk for this drive. |
ZendriveInsurancePeriod |
insurancePeriod
The insurance period in which the drive was detected.
|
double |
maxSpeed
The maximum speed of the drive in meters per second.
|
PhonePosition |
phonePosition
Position of the phone or device for the majority of the drive.
|
DriveScore |
score
The driving behaviour score for this drive.
|
String |
sessionId
Session id is specified by the enclosing application when it wants to
record a session . |
long |
startTimeMillis
The start timestamp of the drive in milliseconds since epoch.
|
ArrayList<ZendriveTagInfo> |
tags
A list of
tag infos for this drive. |
String |
trackingId
Tracking id is specified by the enclosing application when it
wants to
start a drive manually. |
ZendriveUserMode |
userMode
Whether the user was a driver or a passenger.
|
ArrayList<DriveInfo.Warning> |
warnings
A list of
warnings for this drive. |
ArrayList<LocationPointWithTimestamp> |
waypoints
A list of
LocationPointWithTimestamp objects corresponding to this
drive in increasing order of timestamp. |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
DriveInfo()
Default constructor.
|
protected |
DriveInfo(Parcel in) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
public String driveId
driverId
with which the SDK is initialized.
This id can be used as the "trip_id" to query information about a trip from the Zendrive Analytics API.
public long startTimeMillis
public long endTimeMillis
public ZendriveDriveType driveType
@Nullable public ZendriveUserMode userMode
Driver/Passenger detection is disabled by default. Talk to your contact in Zendrive to enable
this feature. Driver/Passenger detection will only be available in AnalyzedDriveInfo
.
Only present when driveType
is ZendriveDriveType.DRIVE
and the SDK was able
to determine with confidence whether the user was a driver or a passenger.
If the SDK was not able to determine the user mode, this field is null.
public double distanceMeters
public double averageSpeed
If we could not estimate the average speed due to lack of reliable location data, this value will be -1.
public double maxSpeed
If we could not estimate the maximum speed due to lack of reliable location data, this value will be -1.
@NonNull public PhonePosition phonePosition
public ArrayList<LocationPointWithTimestamp> waypoints
LocationPointWithTimestamp
objects corresponding to this
drive in increasing order of timestamp. The first point corresponds to drive start location
and last to drive end location.
This is a sampled approximation of the drive which gives an indication of the path taken by the driver. It is not the full detailed location data of the drive. If no waypoints are recorded during the drive, then this is an empty array.
@Nullable public String trackingId
start a drive
manually.
This will be null if no tracking id was specified.
@Nullable public String sessionId
record a session
.
This will be null if there is no session is associated with this drive.
@Nullable public ZendriveInsurancePeriod insurancePeriod
public ArrayList<ZendriveEvent> events
events
detected by the sdk for this drive.public DriveScore score
public ZendriveEventRatings eventRatings
event types
for this drive.public ArrayList<DriveInfo.Warning> warnings
warnings
for this drive.public ArrayList<ZendriveTagInfo> tags
tag infos
for this drive.
The list will be populated only in the AnalyzedDriveInfo
.
public static final Parcelable.Creator<DriveInfo> CREATOR
public DriveInfo()
protected DriveInfo(Parcel in)
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable