package Ġg ge org ip . android template . di . modules Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroid . content . Context Ċ import Ġandroid . net . Connectivity Manager Ċ import Ġandroid . net . wifi . Wifi Manager Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ class ĠApp Module ( val Ġcontext : ĠContext , Ġval Ġapplication : ĠApplication ) Ġ{ ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovides Context (): ĠContext Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcontext ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovides Application (): ĠApplication Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġapplication ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovides Wifi Manager ( context : ĠContext ): ĠW ifi Manager Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcontext . application Context . getSystem Service ( Context . WIFI _ SERVICE ) Ġas ĠW ifi Manager ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovides Connectivity Manager ( context : ĠContext ): ĠConnect ivity Manager Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcontext . application Context . getSystem Service ( Context . CONNECT IVITY _ SERVICE ) Ġas ĠConnect ivity Manager ĊĠĠĠ Ġ} Ċ }