# DriveKit 3.0 migration guide

## What's changed in v3.0?

### Introduction

Version 3.0 of the DriveKit SDK contains breaking changes: all methods that were marked as deprecated during the past year have been permanently removed.

This guide lists every removed element alongside its recommended replacement, organized by module.&#x20;

Following these steps will keep your integration stable and future-proof.

{% hint style="info" %}
This version also features a newly available callback to retrieve the beacon detected and confirmed during trip recording which will not be presented in this migration guide.
{% endhint %}

### How to use this guide

Each section maps to an SDK module. For every removed element, you'll find:

* The exact method, class, or property that was removed
* The recommended drop-in replacement to use instead

## Module-level reset() Methods

The reset() method has been removed from every individual module. Use DriveKit.reset() as your single reset point across all modules.

| Removed in v3.0                   | What to do instead    |
| --------------------------------- | --------------------- |
| DriveKitDriverData.reset()        | Call DriveKit.reset() |
| DriveKitChallenge.reset()         | Call DriveKit.reset() |
| DriveKitCoaching.reset()          | Call DriveKit.reset() |
| DriveKitDriverAchievement.reset() | Call DriveKit.reset() |
| DriveKitGroup.reset()             | Call DriveKit.reset() |
| DriveKitTripAnalysis.reset()      | Call DriveKit.reset() |
| DriveKitVehicle.reset()           | Call DriveKit.reset() |

## DriveKitTripAnalysis

Several one-off methods have been merged into a single, structured call: `getCurrentTripInfo()`. This reduces the number of calls you need to make and gives you all the context about the current trip in one place.

| Removed in v3.0                      | What to do instead                                                                                                           |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| getCurrentStartMode(): StartMode?    | getCurrentTripInfo() → access `startMode`                                                                                    |
| getCurrentTripStartDate(): Date?     | getCurrentTripInfo() → access `startDate`                                                                                    |
| getLastTripPoint(): TripPoint?       | getLastTripPointOfCurrentTrip()                                                                                              |
| getTripResponseStatus(tripResponse:) | tripFinished(result: TripResult) - see [TripResult](https://docs.drivequant.com/trip-analysis/android/references#tripresult) |
| isConfigured()                       | isInitialized property - direct boolean access                                                                               |

### TripListener interface — Updated Methods & Types

The TripListener interface has been redesigned for clarity. The new methods provide richer state objects, so you get more context with less code.

#### Method Replacements

| Removed in v3.0                                                | What to do instead                                             |
| -------------------------------------------------------------- | -------------------------------------------------------------- |
| tripStarted(startMode: StartMode)                              | tripRecordingConfirmed(state: DKTripRecordingConfirmedState)   |
| tripCancelled(cancelTrip: CancelTrip)                          | tripRecordingCanceled(state: DKTripRecordingCanceledState)     |
| tripFinished(post: PostGeneric, response: PostGenericResponse) | tripFinished(responseStatus: TripResponseStatus)               |
| onDeviceConfigEvent(deviceConfigEvent: DeviceConfigEvent)      | DKDeviceConfigurationListener - a dedicated listener interface |

#### Removed Classes & Enums

These types were part of the legacy event model and are no longer needed.

<table data-full-width="false"><thead><tr><th>Removed type</th><th>What to do instead</th></tr></thead><tbody><tr><td>DeviceConfigEvent (class)</td><td>Handled by the new <a href="../advanced-configurations#dkdeviceconfigurationlistener">DKDeviceConfigurationListener</a></td></tr><tr><td>CancelTrip (enum)</td><td>State now lives in <a href="../../../trip-analysis/android/references#dktriprecordingcanceledstate">DKTripRecordingCanceledState</a></td></tr><tr><td>PostGeneric (class)</td><td>No longer needed internally</td></tr><tr><td>PostGenericResponse (class)</td><td>Replaced by <a href="../../../trip-analysis/android/references#tripresult">TripResult</a></td></tr><tr><td>RecorderState (class)</td><td>Referenced CancelTrip - both are now gone</td></tr><tr><td>TripResponseStatus (class)</td><td>Replaced by the cleaner <a href="../../../trip-analysis/android/references#tripresult">TripResult</a></td></tr><tr><td>TripAnalysedReceiver (class)</td><td>Use tripFinished() and tripRecordingCanceled() in <a href="../../trip-analysis/android/triplistener">TripListener</a> instead</td></tr></tbody></table>

### TripNotification

The following TripNotification parameters are no longer used by the SDK. Simply remove them from your notification configuration — no replacement needed.

| Removed parameter            | Action               |
| ---------------------------- | -------------------- |
| gpsAccuracyContent           | Remove the parameter |
| gpsAccuracyButtonContent     | Remove the parameter |
| highSpeedTripDetectedContent | Remove the parameter |
| noGpsIconId                  | Remove the parameter |

## DriveKitVehicle&#x20;

These method wrappers have been removed in favor of idiomatic Kotlin property and function access.

| Removed in v3.0                    | What to do instead                                           |
| ---------------------------------- | ------------------------------------------------------------ |
| VehicleEngineIndex.getValue()      | Use .value directly - e.g. VehicleEngineIndex.GASOLINE.value |
| VehicleEngineIndex.getEnumByName() | Use VehicleEngineIndex.valueOf(name)                         |

## DriveKitDriverAchievement

| Removed in v3.0      | What to do instead                          |
| -------------------- | ------------------------------------------- |
| RankingPeriod.LEGACY | No longer used - remove any reference to it |
