In a typical Android application Dagger is initialized in app startup during the Application.onCreate.

Setup: Initializing Dagger

A typical application may initialize Dagger and request a given dependency. When using Hilt the auto application code may look like the following:

Initializing app using Dagger Hilt

The Hilt compiler plugin will generate code that is similar to manually initializing the component manually.

Initializing app using vanilla Dagger

On Application startup we need to connect to a remote server and send some diagnostic data to a remote server and initialize tracking. …


What is Android Lint?

  • Android lint is a static analysis tool included in Android SDK and integrated within Android Studio. Available within Android Studio as warnings or run directly via gradle via lintDebug
  • Lint checks are run directly within Android Studio on the fly, additional checks disabled by default such as library updates or thread usage analysis can be run by “Analyze->Run Inspection by Name”

Historically the words “Dagger” and “painless” have been mutually exclusive. Dagger has often been associated with complex configuration. Subsequent alternative Kotlin based frameworks have popped up with slogans: “Painless Kotlin Dependency Injection” and “A pragmatic lightweight dependency injection framework for Kotlin developers”. Unfortunately, there is no free lunch and the alternative Kotlin based solutions introduce a different set of tradeoffs such as compile time safety and runtime performance. Why can’t we have our cake and eat it too?

In this article, we will evaluate a simple Kotlin, Android, Dagger app minus the boilerplate and magic. Unfortunately, the official documentation is…


People using their smart phones in the underground subway

A typical web-based desktop app will be rendered in a browser such as Google Chrome on a desktop or laptop. Every user request or screen will result in an associated REST call to the server, and the associated JSON will be retrieved and transformed into a screen update. For example, when a user loads a todo app, the server will issue a GET request to todo/list which will return a JSON array. If the user requests the todo detail another request to /todo/{id} will be issued.

A typical mobile app works very similar to a typical web app, where each…


Mobile development has historically required development on 2 or more distinct platforms and toolkits

  • iOS: (Objective C, Swift, Xcode)
  • Android: (Java, Kotlin, Android Studio)

Abstracting logic and sharing common code that is reused for different purposes is not a new concept, it is the history of modern computing. By comparison, iOS and Android are just over 10 years old and still in its infancy.

Why we need a cross platform solution

Both iOS and Android platforms are sufficiently complex that it takes years for engineers to be considered experts in a single platform. Mastering each platform requires knowledge of 2 officially supported programming languages, knowledge of the…


In the following we will show you how to setup a basic iOS and Android Kotlin Native project to demonstrate the following functionalities:

  • View: Android and IOS shared code using Kotlin Native Common module
  • MVP: platform specific View implementation, common Presenter
  • Multi threading via Coroutines
  • HTTP via Ktor client
  • JSON serialization via kotlinx.serialization
  • Dependency Injection via Kodein
  • Logging via platform specific APIs

We will build a minimal working prototype to connect to a usplash API download a file and display the image. …

Jeremy Rempel

Follow me on twitter @ jeremyrempel . I write and talk about things that are interesting to me. Thoughts and ideas are my own.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store