public class AccidentInfo extends Object implements Parcelable
ZendriveBroadcastReceiver.onAccident(android.content.Context, com.zendrive.sdk.AccidentInfo)
callback.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
String |
accidentId
A unique identifier of this accident.
|
ZendriveCollisionSeverity |
collisionSeverity
Collision severity of the detected accident.
|
ZendriveAccidentConfidence |
confidence
Confidence measure of the detected accident.
|
int |
confidenceNumber
Measures an approximate precision of the detected collision.
|
static Parcelable.Creator<AccidentInfo> |
CREATOR |
ZendriveDirectionOfImpact |
directionOfImpact
Direction of impact of the detected accident.
|
String |
driveId
An identifier for the drive during which the accident occured.
|
LocationPoint |
location
The location of the accident.
|
String |
sessionId
Session id is specified by the enclosing application when it wants to
record a session . |
long |
timestampMillis
The timestamp of the accident in milliseconds since epoch.
|
String |
trackingId
Tracking id is specified by the enclosing application when it wants to
start a drive manually. |
ZendriveVehicleType |
vehicleType
Vehicle type detected by sdk, at the time of accident.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
AccidentInfo()
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.public long timestampMillis
public LocationPoint location
@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.
public ZendriveAccidentConfidence confidence
public String accidentId
public int confidenceNumber
ZendriveBroadcastReceiver.onPotentialAccident(android.content.Context, com.zendrive.sdk.AccidentInfo)
. It is sent as part of
ZendriveBroadcastReceiver.onAccident(android.content.Context, com.zendrive.sdk.AccidentInfo)
to invalidate a previous
onPotentialAccident
callback. Checkout
ZendriveMockAccidentConfiguration.shouldInvalidateFinalCallback()
to test this
scenario during development.public ZendriveVehicleType vehicleType
ZendriveVehicleType.CAR
is the default valuepublic ZendriveCollisionSeverity collisionSeverity
ZendriveCollisionSeverity.UNKNOWN
is the default valuepublic ZendriveDirectionOfImpact directionOfImpact
ZendriveDirectionOfImpact.UNKNOWN
is the default valuepublic static final Parcelable.Creator<AccidentInfo> CREATOR
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable