test foreground service

Foreground Services in Android, Kotlin

What is a foreground service in android? A foreground service runs in the background but must come with a notification, so the user knows it’s running on the OS. It’s used for tasks the user should be aware of that shouldn’t be killed by the OS, such as tracking on a run or playing music, […]


Android Ignore Battery Optimization Programmatically

We develop some android applications with foreground services that execute tasks for a long time. But from Android M or Android 6 or Marshmellow or API v23+, Android decided to put optimize for doze and app standby That causes the app to go to standby mode. The app cannot communicate with a server or do […]

Fetch Google Advertising Id Android, Kotlin coroutines

Nowadays we are using Google advertising id as a unique identifier besides IMEI, GSM subscriber id, Device id, etc. Let’s have a look at how we can retrieve or fetch google ads/advertisement id using Kotlin coroutines.

Companion Object In Kotlin

In Kotlin, If we want to write a function or member of a class that can be called without having the instance of the class, there comes the role of the companion object. So, by declaring the companion object, you can access the members of the class by name only. You can run it on […]

Hello, World!

Click Here for Reference