requiredNetworkType property

NetworkType? requiredNetworkType
getter/setter pairinherited

Android only Set detailed description of the kind of network your job requires.

If your job doesn't need a network connection, you don't need to use this option as the default value is BackgroundFetch.NEWORK_TYPE_NONE. Calling this method defines network as a strict requirement for your job. If the network requested is not available your job will never run.

| NetworkType | Description | |--------------------------------------------------|----------------------------------------------------------------------| | NetworkType.NONE | This job doesn't care about network constraints, either any or none. | | NetworkType.ANY | This job requires network connectivity. | | NetworkType.CELLULAR | This job requires network connectivity that is a cellular network. | | NetworkType.UNMETERED | This job requires network connectivity that is unmetered. | | NetworkType.NOT_ROAMING | This job requires network connectivity that is not roaming. |

Implementation

NetworkType? requiredNetworkType;