-
-
Save Dmuasya/454d7c458a194194d3d83e6ea2229b38 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
if ( connectivity != null) | |
{ | |
info = connectivity!!.activeNetworkInfo | |
if (info != null) | |
{ | |
if (info!!.state == NetworkInfo.State.CONNECTED) | |
{ | |
Snackbar.make(view, "Internet Connected", Snackbar.LENGTH_LONG) | |
.setAction("Action", null).show() | |
} | |
} | |
else | |
{ | |
Snackbar.make(view, "Internet Disconnected", Snackbar.LENGTH_LONG) | |
.setAction("Action", null).show() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment