package Ġcom . ct ech . eat y . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . SharedPreferences Ċ import Ġandroid . preference . Preference Manager Ċ import Ġcom . ct ech . eat y . base . redux . Store Ċ import Ġcom . ct ech . eat y . repository . AppSettings Manager Ċ import Ġcom . ct ech . eat y . ui . app . App Reducer Ċ import Ġcom . ct ech . eat y . ui . app . AppState Ċ import Ġcom . ct ech . eat y . ui . app . epic . Network Change Epic Ċ import Ġcom . ct ech . eat y . util . Network Manager Ċ import Ġcom . ct ech . eat y . util . Resource Provider Ċ import Ġcom . google . gson . Gson Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module ( includes Ġ= ĠarrayOf ( Data Module :: class )) Ċ class ĠApp Module Ġ{ ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide App Storage ( context : ĠContext ): ĠSharedPreferences Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠPreference Manager . getDefault SharedPreferences ( context ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide AppSettings Manager ( shared Preferences : ĠSharedPreferences , Ġgson : ĠGson ): ĠApp Settings Manager Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠApp Settings Manager ( shared Preferences , Ġgson ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Resource Provider ( context : ĠContext ): ĠResource Provider Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġobject Ġ: ĠResource Provider Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun ĠgetString ( res Id : ĠInt , Ġvar arg Ġargs : ĠAny ) Ġ= Ġcontext . getString ( res Id , Ġ* args ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Cache Dir () Ġ= Ġcontext . cacheDir ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun ĠgetString ( id : ĠInt ) Ġ= Ġcontext . getString ( id ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide App Store ( network Manager : ĠNetwork Manager ): ĠStore < AppState > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠStore < AppState > Ġ( AppState ( network Manager . connection Type ()), ĠApp Reducer (), ĠarrayOf ( Network Change Epic ())) ĊĊĠĠĠ Ġ} Ċ }