package Ġcom . release it . crypt op rices Ċ Ċ import Ġandroid . content . Context Ċ import Ġcom . release it . crypt op rices . repository . Crypto Repository Ċ import Ġcom . release it . crypt op rices . repository . Currency Ċ import Ġcom . release it . crypt op rices . repository . Web Crypto Repository Ċ import Ġcom . release it . crypt op rices . utils . PRE F _ NAME Ċ import Ġcom . release it . crypt op rices . utils . Prefs Ċ import Ġcom . release it . crypt op rices . utils . Scheduler Provider Ċ import Ġcom . release it . crypt op rices . utils . currency Ċ import Ġcom . release it . crypt op rices . utils . currency Observable Ċ import Ġcom . release it . crypt op rices . utils . d agger 2 . qual ifiers . ApplicationContext Ċ import Ġcom . release it . crypt op rices . utils . save Currency Ċ import Ġcom . release it . crypt op rices . web . Crypto WebService Ċ import Ġcom . release it . crypt op rices . web . Web Module Ċ import Ġdagger . Bind s Instance Ċ import Ġdagger . Component Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . android . support . Android Support Injection Module Ċ import Ġio . reactivex . Observable Ċ import Ġio . reactivex . android . schedul ers . Android Schedulers Ċ import Ġio . reactivex . schedul ers . Schedulers Ċ import Ġjavax . inject . Singleton Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġj ur aj be gov ac Ġon Ġ 1 4 / 0 2 / 2 0 1 8 . Ċ Ġ*/ Ċ // ĠDI Ċ @ Module Ċ class ĠApp Module Ġ{ ĊĊĠ Ġ@ Provides ĊĠ Ġ@ Singleton ĊĠ Ġ@ ApplicationContext ĊĠ Ġfun Ġcontext ( app : ĠApp ): ĠContext Ġ{ ĊĠĠĠ Ġreturn Ġapp ĊĠ Ġ} ĊĊĠ Ġ@ Provides ĊĠ Ġ@ Singleton ĊĠ Ġfun Ġcrypto Repository ( web Service : ĠCrypto WebService ): ĠCrypto Repository Ġ= ĠWeb Crypto Repository ( web Service ) ĊĊĠ Ġ@ Provides ĊĠ Ġfun Ġprefs (@ ApplicationContext Ġcontext : ĠContext ): ĠP refs Ġ{ ĊĠĠĠ Ġval Ġshared Preferences Ġ= Ġcontext . get SharedPreferences ( PRE F _ NAME , ĠContext . MODE _ PRIVATE ) ĊĠĠĠ Ġreturn Ġobject Ġ: ĠP refs Ġ{ ĊĠĠĠĠĠ Ġoverride Ġvar Ġcurrency : ĠCurrency ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġshared Preferences . currency () ĊĠĠĠĠĠĠĠ Ġset ( value ) Ġ{ ĊĠĠĠĠĠĠĠĠĠ Ġshared Preferences . save Currency ( value ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġoverride Ġval Ġcurrency Observable : ĠObservable < Currency > ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġshared Preferences . currency Observable () ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġ@ Provides ĊĠ Ġfun Ġscheduler Provider () Ġ= Ġobject Ġ: ĠScheduler Provider Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġio () Ġ= ĠS chedulers . io () ĊĊĠĠĠ Ġoverride Ġfun Ġmain () Ġ= ĠAndroid Schedulers . main Thread () ĊĠ Ġ} Ċ Ċ } Ċ Ċ @ Singleton Ċ @ Component ( modules Ġ= Ġ[ ĊĠ ĠAndroid Support Injection Module :: class , ĊĠ ĠActivity Builder :: class , ĊĠ ĠApp Module :: class , ĊĠ ĠWeb Module :: class Ċ ]) Ċ interface ĠApp Component Ġ{ ĊĊĠ Ġfun Ġinject ( target : ĠApp ) ĊĊĠ Ġ@ Component . Builder ĊĠ Ġinterface ĠBuilder Ġ{ ĊĊĠĠĠ Ġ@ Bind s Instance ĊĠĠĠ Ġfun Ġapplication ( app : ĠApp ): ĠBuilder ĊĊĠĠĠ Ġfun Ġbuild (): ĠApp Component ĊĠ Ġ} Ċ } Ċ