@UnstableApi
class CronetEngineWrapper


A wrapper class for a CronetEngine.

Summary

Public constructors

Creates a wrapper for a CronetEngine built using the most suitable .

Creates a wrapper for an existing CronetEngine.

CronetEngineWrapper(
    context: Context!,
    userAgent: String?,
    preferGooglePlayServices: Boolean
)

Creates a wrapper for a CronetEngine built using the most suitable .

Public constructors

CronetEngineWrapper

CronetEngineWrapper(context: Context!)

Creates a wrapper for a CronetEngine built using the most suitable . When natively bundled Cronet and GMSCore Cronet are both available, the natively bundled provider is preferred.

Parameters
context: Context!

A context.

CronetEngineWrapper

CronetEngineWrapper(cronetEngine: CronetEngine!)

Creates a wrapper for an existing CronetEngine.

Parameters
cronetEngine: CronetEngine!

The CronetEngine to wrap.

CronetEngineWrapper

CronetEngineWrapper(
    context: Context!,
    userAgent: String?,
    preferGooglePlayServices: Boolean
)

Creates a wrapper for a CronetEngine built using the most suitable . When natively bundled Cronet and GMSCore Cronet are both available, preferGMSCoreCronet determines which is preferred.

Parameters
context: Context!

A context.

userAgent: String?

A default user agent, or null to use a default user agent of the CronetEngine.

preferGooglePlayServices: Boolean

Whether Cronet from Google Play Services should be preferred over Cronet Embedded, if both are available.