The Android Developer Challenge is back! Submit your idea before December 2.

NetworkType

public final enum NetworkType
extends Enum<NetworkType>

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


An enumeration of various network types that can be used as Constraints for 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[]