Created
May 24, 2020 03:08
-
-
Save ekoo/6bc07bf54f20b983e313c476b9b57350 to your computer and use it in GitHub Desktop.
This file contains 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
lifecycleScope.launch { | |
NetworkInfo().checkConnection(this@MainActivity).collect { connected -> | |
if (connected){ | |
//make some magic | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment