Created
July 24, 2020 19:25
-
-
Save vladimirpetrovski/b00b24b184b0153bfc4c30de5ead182a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val connectivityManager = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager | |
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | |
| connectivityManager.bindProcessToNetwork(null) | |
| } else { | |
| ConnectivityManager.setProcessDefaultNetwork(null) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment