package Ġcom . kan aw ish . ar . robot remote Ċ Ċ import Ġandroid . app . Activity Ċ import Ġandroid . app . Application Ċ import Ġcom . kan aw ish . di . Activity Injection Lifecycle Ċ import Ġcom . kan aw ish . di . Activity Singleton Ċ import Ġcom . kan aw ish . di . Helper Module Ċ import Ġtim ber . log . Tim ber Ċ import Ġtoo th pick . Scope Ċ import Ġtoo th pick . T ooth pick Ċ import Ġtoo th pick . smooth ie . module . Smooth ie Activity Module Ċ import Ġtoo th pick . smooth ie . module . Smooth ie Application Module Ċ Ċ class ĠAr Demo App Ġ: ĠApplication () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate () ĊĊĠĠĠĠĠĠĠ Ġif Ġ( com . kan aw ish . ar . robot remote . Build Config . DEBUG ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTim ber . plant ( Tim ber . Debug Tree ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠTim ber . i ("% s Ġ% d Ġ% s ", ĠBuild Config . VERSION _ NAME , ĠBuild Config . VERSION _ CODE , ĠBuild Config . APPLICATION _ ID ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠDI ĠRoot ĠScope Ġinit ĊĠĠĠĠĠĠĠ ĠT ooth pick . inject ( this , Ġopen Application Scope ( this )) ĊĠĠĠĠĠĠĠ Ġregister Activity Lifecycle Callbacks ( Activity Injection Lifecycle (:: open Activity Scope )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġopen Application Scope ( app : ĠApplication ): ĠScope Ġ= ĠT ooth pick . open Scope ( app ). apply Ġ{ ĊĠĠĠĠĠĠĠ Ġinstall Modules ( Smooth ie Application Module ( app ), ĠHelper Module ( app )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġopen Activity Scope ( activity : ĠActivity ): ĠScope Ġ= ĠT ooth pick . open Scopes ( activity . application , Ġactivity ). apply Ġ{ ĊĠĠĠĠĠĠĠ Ġbind Scope Annotation ( Activity Singleton :: class . java ) ĊĠĠĠĠĠĠĠ Ġinstall Modules ( Smooth ie Activity Module ( activity )) ĊĠĠĠ Ġ} Ċ Ċ } ĊĊĊ