Annyce Davis

Davis Technology Consulting

  • Home
  • About Me
  • Blog
  • Courses
  • Newsletter

Dagger Multibinding in Dynamic Feature Modules

June 14, 2019 by Annyce Davis

We’re adding the use of dynamic feature modules to our app. This will help us to improve build speeds, conditionally include features and decouple our code. As noted previously, we make use of Dagger Multibinding and the Android Job library to handle our background tasks.

When we created our first feature module we ran into an issue when we attempted to move the associated Job classes. Let me walk you through the problem, the solution we settled on and then proposed next steps.

Continue Reading

Realm Migrations Supercharged with Dagger

March 8, 2017 by Annyce Davis

My current tech obsessions are: Realm, Dagger and Unit Testing. Therefore, I’m always looking for opportunities to improve my code in some way that involves one or more of the above. That being said, I realized that the recommended way of handling migrations in Realm could be improved significantly by means of Dagger 2.

We’re going to be refactoring the following Migration class:


With only two version updates, we already have a decent sized method to deal with. What’s more if you didn’t start out by creating tests for your migrations, once this method gets much longer you probably never will. But all is not lost, Dagger’s Multibinding Support is coming to the rescue. Let’s take a look!Continue Reading

Background Work with Android Job and Dagger

November 17, 2016 by Annyce Davis

Background work on Android can be challenging when you have to support a wide range of API levels. Specifically you can use Alarm Manager, Job Scheduler or GCM Network Manager depending on your minimum API level and if the device has Play Services. To help abstract away which implementation you’re using to perform background work, the good folks at Evernote have open-sourced, Android Job.


Android Job works by first allowing you to define how you want your jobs to be created, by means of the Job Creator class. Then you can schedule requests using the Job Manager and have the confidence that they will be run when the requirements are met. In the image below you can see a representation of the various components involved with using Android Job in your application. Each Job is identified by a tag; this is just a simple String that is used to differentiate the various jobs in your application.


Let’s take a look at each piece!

Continue Reading

Follow Me

  • Bluesky

Categories

  • Android (61)
  • Career (5)
  • Communication (4)
  • Flutter (1)
  • Git (4)
  • Gradle (4)
  • Grails (23)
  • iOS (1)
  • Java (8)
  • JavaScript (6)
  • Kotlin (17)
  • Life (5)
  • Public Speaking (26)
  • Revenue (2)
  • RxJava (1)
  • Software Development (14)
  • Twitter (3)
  • Uncategorized (11)
  • Video Course (5)

Follow Me

  • Bluesky

Copyright © 2025 · All Rights Reserved · Log in

 

Loading Comments...