There are a lot of reasons to use Dependency Injection, or even a Framework for it.
In this Article you’ll learn what Dependency Injection is, what benefits and downsides it has and how to use it with the usage of the Koin Framework.
Let’s look at a example of a House with a Doorbell to better understand what dependency injection is. Continue reading “Dependency Injection with Koin and Kotlin in Android”
I’ve integrated a QRCode scanner into my app and it worked fine on my old Android 5 device but throws the error
Camera: Camera new cameraInitNormal:-13
Continue reading “How to fix Camera: Camera new cameraInitNormal:-13”
A Snackbar is a replacement for Toasts in Android. Continue reading “How to use Snackbars”
Logging brings some light into the darkness of your code. If you are new to logging please have a look at Log4j2 for Kotlin Continue reading “Logging in Android”
In Part 1 we dealt with the simplest form of initialization with the primary constructor:
val diameter: Int,
val distanceToSun: Double,
val mass: Double
But wait: there is more: Continue reading “Classes in Kotlin – Part 2”
Why is there a car in the picture? – Because it has class!
Jokes aside, classes are still the building blocks of modern object oriented software design. And of course as the new kid on the block Kotlin has it’s own take on this subject. Continue reading “Classes in Kotlin – Part 1”
Add the following to your dependencies
Continue reading “Kotlinx Datetime”
Kotlin has its own keyword to create list which are mutable
As a child I learned that our solar system has nine planets
val planets = mutableListOf("Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto")
In 2006 Pluto was reclassified as a dwarf planet. So let’s remove Pluto
Consider Volley a 2.0 version of Android Asynchronous Http Client.
A major advantage of Volley over ASyncTask is that you can do multiple requests simultaneously without the overhead of thread management.
Continue reading “Network Requests with Volley”
Adding a splash screen to your app can be done in a five-step process
Add a background_color.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/black" />
Continue reading “How to add a splash screen to your Android app in five steps”