package Ġxyz . team gravity . firebase cloud messaging . injection Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . SharedPreferences Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . components . Singleton Component Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory Ċ import Ġxyz . team gravity . firebase cloud messaging . core . extension . Preferences Ċ import Ġxyz . team gravity . firebase cloud messaging . data . remote . Firebase Cloud Messaging Api Ċ import Ġxyz . team gravity . firebase cloud messaging . data . repository . Firebase Cloud Messaging Repository Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ @ Install In ( Singleton Component :: class ) Ċ object ĠApplication Module Ġ{ ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Gson Converter Factory (): ĠGson Converter Factory Ġ= ĠGson Converter Factory . create () ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Firebase Cloud Messaging Api ( factory : ĠGson Converter Factory ): ĠFirebase Cloud Messaging Api Ġ= ĊĠĠĠĠĠĠĠ ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl ( Firebase Cloud Messaging Api . BASE _ URL ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( factory ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. create ( Firebase Cloud Messaging Api :: class . java ) ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Firebase Cloud Messaging Repository ( api : ĠFirebase Cloud Messaging Api ): ĠFirebase Cloud Messaging Repository Ġ= ĊĠĠĠĠĠĠĠ ĠFirebase Cloud Messaging Repository ( api ) ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide SharedPreferences ( app : ĠApplication ): ĠSharedPreferences Ġ= Ġapp . get SharedPreferences ( Preferences . PRE FS , ĠContext . MODE _ PRIVATE ) Ċ }