Service locator is when the injection API is directly to retrieve instance (get() or by inject() for example in Koin). In this way, Dagger is also a service locator: you need to call inject(this) to fill your properties in your Activity.

In Koin, you can use dependency injection with the container (your modules) that help you inject your instances by constructor.

The difference is in using or not directly the injection API, which link your class by design to the injection technology behind.

Software Engineer — Tech Speaker & Writer — Kotlin Google Dev Expert — Open Source Maker

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