Fragmented - Android Developer Podcast cover image

246 - Dependency Injection: Kotlin Inject with Fred Porciúncula

Fragmented - Android Developer Podcast

00:00

Kotlin Inject: The Singleton Case

Kotlin inject works exactly the same as Dagger. There's no built-in scope annotation that you can use from the start and you have to create your own. You annotate your component and then you annotate or the penises that are going to be part of that component. Then, you know, they match. If your component is also notated with that scope, that's the same with Dagger, regardless of the name. And then you always get the same instance as long as you're asking to the same component. So it's actually the same. It's just that you have to creating your own scope annotations before anything.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app