[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/android/net/http/ConnectionMigrationOptions [Back]  [Original]

ConnectionMigrationOptions  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.

ConnectionMigrationOptions


public class ConnectionMigrationOptions
extends Object

java.lang.Object
   ↳ android.net.http.ConnectionMigrationOptions


A class configuring the HTTP connection migration functionality.

Connection migration stops open connections to servers from being destroyed when the client device switches its L4 connectivity (typically the IP address as a result of using a different network). This is particularly common with mobile devices losing wifi connectivity and switching to cellular data, or vice versa (a.k.a. the parking lot problem). QUIC uses connection identifiers which are independent of the underlying transport layer to make this possible. If the client connects to a new network and wants to preserve the existing connection, they can do so by using a connection identifier the server knows to be a continuation of the existing connection.

The features are only available for QUIC connections and the server needs to support connection migration.

See also:

Summary

Nested classes

class ConnectionMigrationOptions.Builder

Builder for ConnectionMigrationOptions

Constants

int MIGRATION_OPTION_DISABLED

Option is disabled.

int MIGRATION_OPTION_ENABLED

Option is enabled.

int MIGRATION_OPTION_UNSPECIFIED

Option is unspecified, platform default value will be used.

Public methods

int getAllowNonDefaultNetworkUsage()

See Builder.setAllowNonDefaultNetworkUsage(int)

int getDefaultNetworkMigration()

See Builder.setDefaultNetworkMigration(int)

int getPathDegradationMigration()

See Builder.setPathDegradationMigration(int)

Inherited methods

Constants

MIGRATION_OPTION_DISABLED

Added in API level 34
Also in S Extensions 7
public static final int MIGRATION_OPTION_DISABLED

Option is disabled.

Constant Value: 2 (0x00000002)

MIGRATION_OPTION_ENABLED

Added in API level 34
Also in S Extensions 7
public static final int MIGRATION_OPTION_ENABLED

Option is enabled.

Constant Value: 1 (0x00000001)

MIGRATION_OPTION_UNSPECIFIED

Added in API level 34
Also in S Extensions 7
public static final int MIGRATION_OPTION_UNSPECIFIED

Option is unspecified, platform default value will be used.

Constant Value: 0 (0x00000000)

Public methods

getAllowNonDefaultNetworkUsage

Added in API level 34
Also in S Extensions 7
public int getAllowNonDefaultNetworkUsage ()

See Builder.setAllowNonDefaultNetworkUsage(int)

Returns
int Value is one of the following:

getDefaultNetworkMigration

Added in API level 34
Also in S Extensions 7
public int getDefaultNetworkMigration ()

See Builder.setDefaultNetworkMigration(int)

Returns
int Value is one of the following:

getPathDegradationMigration

Added in API level 34
Also in S Extensions 7
public int getPathDegradationMigration ()

See Builder.setPathDegradationMigration(int)

Returns
int Value is one of the following:

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page