Package-level declarations

Types

Link copied to clipboard

Information about an accident detected by the Fairmatic SDK. This is provided to the application via the FairmaticBroadcastReceiver.onAccident callback.

Link copied to clipboard

Information about the currently ongoing drive recorded by the Fairmatic SDK. The drive may have started manually by the application or due to Fairmatic auto drive detection.

Link copied to clipboard

Completely analyzed information about a drive recorded by the Fairmatic SDK. The drive may have started manually by the application or due to Fairmatic auto drive detection. This is available with FairmaticBroadcastReceiver.onDriveAnalyzed callback.

Link copied to clipboard
open class DriveInfo

Information about a drive recorded by the Fairmatic SDK. The drive may have started manually by the application or due to Fairmatic auto drive detection.

Link copied to clipboard

Information about a drive that was resumed in the Fairmatic SDK. This is called after the drive recording resumes after a gap. The gap may occur due to an application restart by the OS, application kill and restart by a user, an application crash etc.

Link copied to clipboard

Information about a drive that was just started in the Fairmatic SDK. The drive may have started manually by the application or due to Fairmatic auto drive detection.

Link copied to clipboard

Information about a drive recorded by the Fairmatic SDK. The drive may have started manually by the application or due to Fairmatic auto drive detection. This is available with FairmaticBroadcastReceiver.onDriveEnd callback.

Link copied to clipboard

Indicates the confidence of the reported accident. See AccidentInfo for details.

Link copied to clipboard

The callback returned to the application as a result of a call to FairmaticVehicleTagging.getNearbyBeacons. It is invoked upon completion of BLE scanning.

Link copied to clipboard

A receiver to receive callbacks from the Fairmatic SDK when interesting events occur or are detected in the SDK. To receive these callbacks - the application should subclass this class and implement the abstract handlers for SDK callbacks. The subclass should then be registered with the Fairmatic SDK via the SDK setup call.

Link copied to clipboard

Indicates the severity of a collision reported by Fairmatic. Apps may use this to appropriately surface and communicate collision to users.

Link copied to clipboard
class FairmaticConfiguration(var sdkKey: String, val driverId: String, val driverAttributes: FairmaticDriverAttributes)

The configuration to pass to Fairmatic for com.fairmatic.sdk.Fairmatic.setup. It contains properties like the sdk key, driver id, driver attributes etc.

Link copied to clipboard

Represents the day of of the week.

Link copied to clipboard

Indicates the direction of impact of a collision reported by fairmatic. Apps may use this to appropriately surface and communicate collision to users.

Link copied to clipboard

Dictates the functioning of Fairmatic's drive detection.

Link copied to clipboard
class FairmaticDriverAttributes(var name: String, var email: String? = null, var phoneNumber: String? = null)

Additional attributes of a Fairmatic driver. The application can specify both predefined and custom attributes for a driver. These attributes are associated with a SDK driverId at SDK initialization time. In addition to predefined special attributes, up to 4 custom key value attributes can be associated with a driver of the Fairmatic SDK. These attributes are available on the Fairmatic dashboard and via the API.

Link copied to clipboard

Type of drive recorded by the Zendrive SDK.

Link copied to clipboard

An error code that indicates the type of error that occured during a Fairmatic SDK operation.

Link copied to clipboard

Represents an interesting event detected by Fairmatic during a drive. Events like speeding, phone use can span a time duration and start a particular location and end at another location. Events like hard braking and rapid acceleration are instantaneous. The start and end timestamps and the start and end locations for instantaneous events are the same.

Link copied to clipboard

Indicates the severity of a event reported by Fairmatic. Apps may use this to appropriately surface and communicate events to users.

Link copied to clipboard

Type of events that may be reported by the Fairmatic SDK.

Link copied to clipboard

The extrapolation details of a drive. The details are provided for drives with DriveInfo.driveType as FairmaticDriveType.DRIVE.

Link copied to clipboard

The different insurance periods supported by the com.fairmatic.sdk.Fairmatic API. Each drive belongs to exactly one of these periods.

Link copied to clipboard

The configuration to trigger a mock collision using com.fairmatic.sdk.Fairmatic.triggerMockAccident. It contains the fields to set the vehicle type, collision severity, direction of impact, the confidence for the collision events sent in FairmaticBroadcastReceiver.onPotentialAccident and FairmaticBroadcastReceiver.onAccident and the delay between the callbacks.

Link copied to clipboard

Used to encapsulate a notification along with a notification ID. It is used by the Fairmatic SDK to obtain notifications returned by an app supplied class that implements the FairmaticNotificationProvider interface.

Link copied to clipboard

An instance of this is passed to the Fairmatic SDK in the com.fairmatic.sdk.Fairmatic.setup method. The implementing subclass must provide a default constructor.

Link copied to clipboard

Callback that is used for asynchronous Fairmatic calls. It is invoked upon completion of the call. The callback is made on main thread.

Link copied to clipboard

A result of an operation performed on the Fairmatic SDK. This indicates whether the operation was a success or a failure. In the case of failure, a error code and error message are provided.

Link copied to clipboard

This class represents any FairmaticSettingError that impacts Fairmatic SDK's normal behaviour.

Link copied to clipboard

Information about the beacon scanned by the SDK.

Link copied to clipboard

This class represent an error in application or device settings that is affecting the ability of the SDK to detect trips.

Link copied to clipboard

This class surfaces errors in device or application settings that affect SDK trip detection as well as warnings that may affect the normal functioning of the Fairmatic SDK.

Link copied to clipboard

The callback returned to the application as a result of a call to com.fairmatic.sdk.Fairmatic.getFairmaticSettings. Callback is made on the Main Thread.

Link copied to clipboard

This class represents a warning that may impact the normal functioning of the Fairmatic SDK.

Link copied to clipboard

Indicates the direction of the FairmaticEventType.HARD_TURN event reported by Fairmatic. This will be null for other event types.

Link copied to clipboard

For a DriveInfo, whether the user was a driver or a passenger

Link copied to clipboard

Check if bluetooth scan is supported on the device. Scan for beacons in the proximity.

Link copied to clipboard

Type of vehicle used in the drive recorded by the Fairmatic SDK. A default vehicle type can be set using FairmaticDriverAttributes.setVehicleType in FairmaticDriverAttributes. The detected type is returned to the application in the FairmaticVehicleType field of the DriveInfo.

Link copied to clipboard

This class represents an error that occurred when attempting to connect to google play services.

Link copied to clipboard

This class represents an error associated with Google Play Services settings.

Link copied to clipboard

A geographic point location.

Link copied to clipboard

A location and the timestamp corresponding to the location.

Link copied to clipboard

Position of the phone or device for the majority of the drive

Link copied to clipboard

Extra information for a Speeding event. i.e eventType == SPEEDING