ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Follow publication

Dagger 2 on Android: The Official Guidelines You Should Be Following

Fred Porciúncula
ProAndroidDev
Published in
6 min readDec 19, 2018

--

“male soldier yawning” by Siddharth Singh on Unsplash

TL;DR:

Scoping

Static

(…) any module whose @Provides methods are all static, the implementation doesn’t need an instance at all.

Application context

@Binds

Testing

It’s important for all tests (…) to be independent from the outside world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--