/* Ċ Copyright Ġ 2 0 2 0 - 2 0 2 1 Ġli in ah am ari Ċ Ċ Permission Ġis Ġhereby Ġgranted , Ġfree Ġof Ġcharge , Ġto Ġany Ġperson Ġobtaining Ġa Ġcopy Ġof Ġthis Ġsoftware Ġand Ġassociated Ġdocumentation Ġfiles Ġ Ċ ( the Ġ" Software "), Ġto Ġdeal Ġin Ġthe ĠSoftware Ġwithout Ġrestriction , Ġincluding Ġwithout Ġlimitation Ġthe Ġrights Ġto Ġuse , Ġcopy , Ġmodify , Ġmerge , Ġ Ċ publish , Ġdistribute , Ġsublicense , Ġand / or Ġsell Ġcopies Ġof Ġthe ĠSoftware , Ġand Ġto Ġpermit Ġpersons Ġto Ġwhom Ġthe ĠSoftware Ġis Ġfurnished Ġto Ġdo Ġso , Ġ Ċ subject Ġto Ġthe Ġfollowing Ġconditions : Ċ Ċ The Ġabove Ġcopyright Ġnotice Ġand Ġthis Ġpermission Ġnotice Ġshall Ġbe Ġincluded Ġin Ġall Ġcopies Ġor Ġsubstantial Ġportions Ġof Ġthe ĠSoftware . Ċ Ċ THE ĠSOFTWARE ĠIS ĠPROVIDED Ġ" AS ĠIS ", ĠWITHOUT ĠWARRANTY ĠOF ĠANY ĠKIND , ĠEXPRESS ĠOR ĠIMPLIED , ĠINCLUDING ĠBUT ĠNOT ĠLIMITED ĠTO ĠTHE ĠWARRANTIES ĠOF Ġ Ċ MER CHANTABILITY , ĠFITNESS ĠFOR ĠA ĠPARTICULAR ĠPURPOSE ĠAND ĠNONINFRINGEMENT . ĠIN ĠNO ĠEVENT ĠSHALL ĠTHE ĠAUTHORS ĠOR ĠCOPYRIGHT ĠHOLDERS ĠBE ĠLIABLE ĠFOR Ġ Ċ ANY ĠCLAIM , ĠDAMAGES ĠOR ĠOTHER ĠLIABILITY , ĠWHETHER ĠIN ĠAN ĠACTION ĠOF ĠCONTRACT , ĠTORT ĠOR ĠOTHERWISE , ĠARISING ĠFROM , ĠOUT ĠOF ĠOR ĠIN ĠCONNECTION ĠWITH ĠTHE Ġ Ċ SOFTWARE ĠOR ĠTHE ĠUSE ĠOR ĠOTHER ĠDEALINGS ĠIN ĠTHE ĠSOFTWARE . Ċ */ Ċ Ċ package Ġdev . li in ah am ari . follow er . di . modules Ċ Ċ import Ġandroid . app . Alarm Manager Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . SharedPreferences Ċ import Ġandroidx . preference . Preference Manager Ċ import Ġcom . google . gson . Gson Ċ import Ġcom . google . gson . Gson Builder Ċ import Ġcom . sco tty ab . root beer . Root Be er Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . Re usable Ċ import Ġdev . li in ah am ari . follow er . Follower App Ċ import Ġdev . li in ah am ari . follow er . R Ċ import Ġdev . li in ah am ari . follow er . helper . rx . Base Comp os ers Ċ import Ġdev . li in ah am ari . follow er . screens . settings . Auto Tracking Scheduling UseCase Ċ import Ġjavax . inject . Named Ċ import Ġjavax . inject . Singleton Ċ Ċ const Ġval ĠAPP _ CONTEXT Ġ= Ġ" application _ context " Ċ const Ġval ĠUID Ġ= Ġ" userID " Ċ Ċ @ Module Ċ class ĠApp Module Ġ{ ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Root Be er (@ Named ( APP _ CONTEXT ) Ġcontext : ĠContext ): ĠRoot Be er Ġ= ĠRoot Be er ( context ) ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Named ( APP _ CONTEXT ) ĊĠĠĠ Ġfun Ġbind Context ( app : ĠFollow er App ): ĠContext Ġ= Ġapp . application Context ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Re usable ĊĠĠĠ Ġfun Ġprovide Auto Tracking Scheduling UseCase ( prefs : ĠSharedPreferences , Ġ@ Named ( APP _ CONTEXT ) Ġctx : ĠContext , Ġcomp os ers : ĠBase Comp os ers , Ġalarm Manager : ĠAlarm Manager ): ĠAuto Tracking Scheduling UseCase Ġ= ĊĠĠĠĠĠĠĠ ĠAuto Tracking Scheduling UseCase ( prefs , Ġctx , Ġcomp os ers , Ġalarm Manager ) ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġbind Shared Prefs (@ Named ( APP _ CONTEXT ) Ġcontext : ĠContext ): ĠSharedPreferences Ġ= ĠPreference Manager . getDefault SharedPreferences ( context ) ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Named ( UID ) Ġ/* Ġhttps :// developer . android . com / training / articles / user - data - ids . html Ġ*/ ĊĠĠĠ Ġfun Ġprovide UID ( shared Preferences : ĠSharedPreferences , Ġ@ Named ( APP _ CONTEXT ) Ġcontext : ĠContext ): ĠString Ġ= Ġshared Preferences . getString ( context . getString ( R . string . pref _ uid ), Ġnull ) !! ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Gson (): ĠGson Ġ= ĠGson Builder () ĊĠĠĠĠĠĠĠ Ġ. set Pretty Print ing () ĊĠĠĠĠĠĠĠ Ġ. create () Ċ } Ċ