How to disable doze mode in android, kotlin?

To disable doze mode in an Android device, you can follow these steps: Alternatively, you can disable doze mode for specific apps by using the following code in Kotlin: Note that this code is intended for use in an Activity class. You may need to modify it slightly depending on your specific use case. Additionally, […]

Factory Method

What is a Factory Method in Kotlin?

It’s a kinda Design Pattern. How and when do we need to use it? The Factory method is a creational pattern used to create objects when – A class cannot anticipate the type of objects it needs to create beforehand. You want to localize the logic to instantiate a complex object. You need several “constructors” […]

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