3min chapter

Fragmented - Android Developer Podcast cover image

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

Fragmented - Android Developer Podcast

CHAPTER

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.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode