Driving Alert
Handles DrivingAlert related requests with IMS web services.
Notifies the server that the currently-logged-in user wishes to receive alerts.
Alerts will be sent when the driver with the specified driverId
encounters an event specified by the DrivingAlertType
.
The specified driver can be either the primary or any secondary driver in the user's account.
Parameters:
alertType
: The type of alert to register.
The alertType
can be acceleration
, braking
, lateNight
, and speeding.
To register for receiving driving alerts, the following API can be used.
Concrete example
let service = DrivingAlertService()
service.registerAlertSetting(alertType, then: { result in
switch result {
case .success(_):
// successful
case .failure(_):
// error
}
})
Last updated