Skip to content

Instantly share code, notes, and snippets.

View aenonGit's full-sized avatar

Vincenzo Esposito aenonGit

View GitHub Profile
@aenonGit
aenonGit / ConnectivityChangeReceiver.kt
Created October 2, 2018 09:58
Check the connectivity status in Android
class ConnectivityChangeReceiver (val listener : ConnectivityEventsListener?) : BroadcastReceiver() {
interface ConnectivityEventsListener {
fun onConnected() {}
fun onConnecting() {}
fun onDisconnected() {}
fun onDisconnecting() {}
fun onSuspended() {}
fun onUnknown() {}
}