---
title: "Discussion on \"Monitor internet connection in android\" | Hashnode"
description: "Discussion on \"Monitor internet connection in android\". Create a class that notifies observe classes about the network connection and disconnection.\n/**\n * Internet Util class to observer connection.\n */\nclass InternetConnectionUtil constructor(context: Context, listener: (Int) -> Unit) {\n    init {\n     ..."
url: "https://hashnode.com/posts/monitor-internet-connection-in-android/63a43689ffed926e2a0d0682"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Monitor internet connection in android](https://surajbahadur.hashnode.dev/monitor-internet-connection-in-android?utm_source=hashnode&utm_medium=feed)

Create a class that notifies observe classes about the network connection and disconnection. /\*\* \* Internet Util class to observer connection. \*/ class InternetConnectionUtil constructor(context: Context, listener: (Int) -> Unit) { init { ...

Dec 22, 2022 · 1 min read · surajbahadur.hashnode.dev  
Read the article

-   [#connectivitymanager](https://hashnode.com/tag/connectivitymanager)
-   [#monitor-internet-connection](https://hashnode.com/tag/monitor-internet-connection)
-   [#android](https://hashnode.com/tag/android)
-   [#kotlin](https://hashnode.com/tag/kotlin)

## Written by

[Suraj Bahadur](https://hashnode.com/@SurajBahadur)

@SurajBahadur · Chandigarh

  
[View profile](https://hashnode.com/@SurajBahadur)

Android Developer

A self-taught/solo programmer and building apps since 2016 in android using java/kotlin.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
