---
title: "Suraj Bahadur (@SurajBahadur) | Hashnode"
description: "Android Developer. Read the latest articles by Suraj Bahadur on Hashnode."
url: "https://hashnode.com/@SurajBahadur"
---

@SurajBahadur

# Suraj Bahadur

@SurajBahadur · Chandigarh · Joined November 2021

Android Developer

[Website](https://gangsofcoder.blogspot.com/)

### [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 { ...

1 min read · [surajbahadur.hashnode.dev](https://surajbahadur.hashnode.dev/monitor-internet-connection-in-android?utm_source=hashnode&utm_medium=feed)

[Dec 22, 2022](https://hashnode.com/posts/monitor-internet-connection-in-android/63a43689ffed926e2a0d0682)

### [Firebase Notifications in Background & Foreground in Android](https://surajbahadur.hashnode.dev/firebase-notifications-in-background-and-foreground-in-android?utm_source=hashnode&utm_medium=feed)

Firebase Notifications in Background & Foreground in Android

3 min read · [surajbahadur.hashnode.dev](https://surajbahadur.hashnode.dev/firebase-notifications-in-background-and-foreground-in-android?utm_source=hashnode&utm_medium=feed)

[Dec 14, 2021](https://hashnode.com/posts/firebase-notifications-in-background-and-foreground-in-android/61b8e92d0059f90a57a58e50)

### [Compare Two Date In Kotlin](https://surajbahadur.hashnode.dev/compare-two-date-in-kotlin?utm_source=hashnode&utm_medium=feed)

How to compare to date in kotlin android java

1 min read · [surajbahadur.hashnode.dev](https://surajbahadur.hashnode.dev/compare-two-date-in-kotlin?utm_source=hashnode&utm_medium=feed)

[Dec 9, 2021](https://hashnode.com/posts/compare-two-date-in-kotlin/61b192896a81cf6b31dfb98a)

### [50 Productivity And Personal Development Skills For Career And Business](https://surajbahadur.hashnode.dev/50-productivity-and-personal-development-skills-for-career-and-business?utm_source=hashnode&utm_medium=feed)

Skills For Before Starting To Work Self-awareness and self-exploration to choose the right life goals for yourself Figuring out and deciding on your life purpose and direction Goal setting to set large, achievable goals that will excite and motiva...

2 min read · [surajbahadur.hashnode.dev](https://surajbahadur.hashnode.dev/50-productivity-and-personal-development-skills-for-career-and-business?utm_source=hashnode&utm_medium=feed)

[Dec 8, 2021](https://hashnode.com/posts/50-productivity-and-personal-development-skills-for-career-and-business/61b05ac49759e33b4eafa04b)

### [Keep these things in mind when using ViewModel in your application](https://surajbahadur.hashnode.dev/keep-these-things-in-mind-when-using-viewmodel-in-your-application?utm_source=hashnode&utm_medium=feed)

Don't let ViewModels know about Android framework classes. (A general rule of thumb is to make sure there are not(android.) imports in your ViewModels(with an exception like android.arch.) Keep the logic in activities and Fragments to a minimum. Av...

1 min read · [surajbahadur.hashnode.dev](https://surajbahadur.hashnode.dev/keep-these-things-in-mind-when-using-viewmodel-in-your-application?utm_source=hashnode&utm_medium=feed)

[Dec 8, 2021](https://hashnode.com/posts/keep-these-things-in-mind-when-using-viewmodel-in-your-application/61b0560f079fa33c086106c8)
