DEV Community

Rahul Chowdhury 🕶
Rahul Chowdhury 🕶

Posted on

1 1

Day 2: Relearning Dagger 2

It's day 2 of my job finding journey.

Where am I right now?

I started implementing a simple app using Android Architecture Components, Dagger and Kotlin.

GitHub logo rahulchowdhury / elly

Demo Android app with the new Android Jetpack 🚀components.

elly

Demo Android app with the new Android Jetpack 🚀components.




I didn't know Dagger 2 has come such a long way since I last learned to use it.

There's a whole new module called dagger.android, explicitly designed to reduce boilerplate Dagger code on Android projects.

View models now have a new trick called SavedStateHandle to reduce boilerplate while handling app state.

Turns out injecting a SavedStateHandle to a view model isn't straightforward. There's a lot to setup.

Currently, I'm stuck in making that work.

What am I doing today?

I'm going to take a step back and get accustomed to this new dagger.android module, first.

Then, I'm going to set up SavedStateHandle injection using Dagger in my app.

When all this is done, I'll be working on implementing & caching a single API call to show cool elephant profiles.

Any tips to guide me through this?

Final notes

I'm looking out for a job for the role of Android Engineer. I have over 3.5 years of experience, and either a career in Bangalore or a Remote job works for me.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (1)

Collapse
 
rahulchowdhury profile image
Rahul Chowdhury 🕶

Getting Dagger to work with view models and SavedStateHandle is taking up a lot of time with no fruition. Trying Koin right now.

Will get back to Dagger at a later point. 😁

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay