Switch Ruby Versions on Mac: Easy Steps for M1 to M4

Easily Switch Ruby Versions on Your Mac (M1, M2, M3, M4 Included) Are you tired of wrestling with Ruby version updates and installations on your Mac? Whether you’re configuring tools like CocoaPods for Flutter, Kotlin Multiplatform(KMP/KMM), iOS development or need different Ruby versions for your projects, this guide saves your day (and time!). With these… Continue reading Switch Ruby Versions on Mac: Easy Steps for M1 to M4

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,… Continue reading How to disable doze mode in android, kotlin?

Debounce in Kotlin Android Search View

In Kotlin, a debounce the function limits the rate at which a particular action is performed. This can be useful in a variety of situations, such as when performing a network request or a complex calculation. By debouncing an action, you can prevent it from being performed too frequently, which can improve your app’s performance… Continue reading Debounce in Kotlin Android Search View

How to enable auto start permission programmatically for customized android OS?

Mi, Xiaomi, Oppo, Vivo, Huawei, LeTV, Asus like smartphone manufacturers are using a customized android OS that looks like and works differently than the stock android OS. Those manufacturers use lots of security functionality. Like your background service will be stopped after screen lock, the device will go to doze mode, foreground service will not… Continue reading How to enable auto start permission programmatically for customized android OS?

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”… Continue reading What is a Factory Method in Kotlin?

What are Generics in Kotlin?

They enable types (classes and interfaces) to be parameters when defining classes, interfaces, and methods/functions. Much like the more familiar formal parameters used in the method declarations, type parameters provide a way for you to re-use the same code with different inputs. Generic classes and methods combine reusability, type safety, and efficiency in a way… Continue reading What are Generics in Kotlin?

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,… Continue reading Foreground Services in Android, Kotlin

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… Continue reading Android Ignore Battery Optimization Programmatically

Exit mobile version