I’ve trying to ensure that all traffic goes over a...
# android
j
I’ve trying to ensure that all traffic goes over a particular network. The problem is that for some reason
setProcessDefaultNetwork(...)
is missing. Am I missing an SDK or something? I’m thinking this may be a Kotlin issue, but I’m not sure.
Copy code
if (isEnabled && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    connectivityManager.bindProcessToNetwork(network)
} else {
    connectivityManager.setProcessDefaultNetwork(network)
}
stackoverflow 1
1
d
Maybe look at your compile and build sdk versions... and maybe clean caches afterwards...I don't think it has anything to do w/ Kotlin...