# Migrate to 3.1.10

Last updated:

<!-- -->

October 18, 2026

<!-- -->

\| 2 minutes read

<br />

<br />

This guide outlines the breaking changes introduced in SDK version 3.1.10. Required updates may vary depending on your use case.

Additionally, new features and bugfixes have been introduced and are **not** documented here. For a comprehensive list of changes, please refer to the changelog.

This release changes the return type of a `TrafficService` method so it can report several active restrictions at once, and updates how the Android plugin is built. Most projects only need updates if they call `getOnlineServiceRestrictions` or build on an older Android Gradle Plugin version.

## The *getOnlineServiceRestrictions* method of the *TrafficService* class now returns a *Set*[​](#the-getonlineservicerestrictions-method-of-the-trafficservice-class-now-returns-a-set "Direct link to the-getonlineservicerestrictions-method-of-the-trafficservice-class-now-returns-a-set")

The `getOnlineServiceRestrictions` method now returns a `Set<TrafficOnlineRestrictions>` with all active restrictions instead of a single `TrafficOnlineRestrictions` value. This allows the method to report multiple restrictions that apply at the same time, which a single value could not express.

Update any variables or method signatures that expect a single `TrafficOnlineRestrictions` value to use `Set<TrafficOnlineRestrictions>` instead.

Before:

```dart
TrafficOnlineRestrictions restriction = TrafficService.getOnlineServiceRestrictions(coords);

```

After:

```dart
Set<TrafficOnlineRestrictions> restrictions = TrafficService.getOnlineServiceRestrictions(coords);

```

## The Android plugin now builds using AGP's built-in Kotlin support[​](#the-android-plugin-now-builds-using-agps-built-in-kotlin-support "Direct link to The Android plugin now builds using AGP's built-in Kotlin support")

The SDK's Android plugin is now compiled using the Android Gradle Plugin's built-in Kotlin support instead of applying the standalone Kotlin Gradle plugin.

For the full set of steps to adapt your project, see Android's official [Migrate to built-in Kotlin](https://developer.android.com/build/migrate-to-built-in-kotlin) guide.
