I am learning WorkManager
and wondering if following the correct way of setting network constraint for both Wifi and data (cellular):
val constraints = Constraints.Builder().run {
setRequiredNetworkType(NetworkType.UNMETERED) //Wifi
setRequiredNetworkType(NetworkType.METERED) //data
build()
}
That's exactly the use case for the NetworkType.CONNECTED
type:
Any working network connection is required for this work.