Skip to content

An application with Dagger 2, shared preference, retrofit API and Room storage. Each and every concept is implemented in separate activity for beginners.

Notifications You must be signed in to change notification settings

Android-Rajaganapathi/DaggerPreferenceRetrofitPersistance

Repository files navigation

DaggerPreferenceRetrofitPersistance

An application with Dagger 2, shared preference, retrofit API and Room storage. Each and every concept is implemented in separate activity for beginners.

In my previous Git repo I have provide Dagger 2 in simple steps. It is available here.

Here in this repo I've used shared preference, API calling(Retrofit) and persistance storage(Room DB) with the help of dependency injection(Dagger 2).


Lets pop into the code:

  • SimpleActivity.java: - for simple Dagger 2 introduction and basic functionality (info available here)

  • PreferenceActivity.java: - for storing and retriving data from SharedPreferences

Preferences and utils will be injected through dagger component.

  • NetworkActivity.java: - for calling API using Retrofit

Retrofit setup and call is done in NetworkModule and injected in activity thought dagger.

  • PersistenceActivity.java: - for storing and retriving data from Room

Room setup and DAO is defined in PersistenceModule and injected in activity thought dagger.

Each specific component holds an respective custom scopes.

About

An application with Dagger 2, shared preference, retrofit API and Room storage. Each and every concept is implemented in separate activity for beginners.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages