Day 2: Relearning Dagger 2
Rahul Chowdhury 🕶

Rahul Chowdhury 🕶 @rahulchowdhury

About: Android Engineer with over 3.5 years of experience. Writes code in Kotlin, Ruby and JavaScript.

Location:
Bangalore, India
Joined:
Feb 21, 2019

Day 2: Relearning Dagger 2

Publish Date: Jul 25 '19
6 1

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.

Comments 1 total

  • Rahul Chowdhury 🕶
    Rahul Chowdhury 🕶Jul 25, 2019

    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. 😁

Add comment