Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

NetworkType

public final enum NetworkType
extends Enum<NetworkType>

java.lang.Object
   ↳ java.lang.Enum<androidx.work.NetworkType>
     ↳ androidx.work.NetworkType


The type of network required by a unit of work.

Summary

Enum values

NetworkType  CONNECTED

Any working network connection is required for this work. 

NetworkType  METERED

A metered network connection is required for this work. 

NetworkType  NOT_REQUIRED

A network is not required for this work. 

NetworkType  NOT_ROAMING

A non-roaming network connection is required for this work. 

NetworkType  UNMETERED

An unmetered network connection is required for this work. 

Public methods

static NetworkType valueOf(String name)
static final NetworkType[] values()

Inherited methods

Enum values

CONNECTED

public static final NetworkType CONNECTED

Any working network connection is required for this work.

METERED

public static final NetworkType METERED

A metered network connection is required for this work.

NOT_REQUIRED

public static final NetworkType NOT_REQUIRED

A network is not required for this work.

NOT_ROAMING

public static final NetworkType NOT_ROAMING

A non-roaming network connection is required for this work.

UNMETERED

public static final NetworkType UNMETERED

An unmetered network connection is required for this work.

Public methods

valueOf

public static NetworkType valueOf (String name)

Parameters
name String

Returns
NetworkType

values

public static final NetworkType[] values ()

Returns
NetworkType[]