package Ġcom . sn ip ed Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroid . content . SharedPreferences Ċ import Ġandroid . preference . Preference Manager Ċ import Ġcom . facebook . flip per . android . Android Flip per Client Ċ import Ġcom . facebook . flip per . android . utils . Flip per Utils Ċ import Ġcom . facebook . flip per . plugins . inspector . Descriptor Mapping Ċ import Ġcom . facebook . flip per . plugins . inspector . Inspector Flip per Plugin Ċ import Ġcom . facebook . flip per . plugins . network . Flip per Ok http Interceptor Ċ import Ġcom . facebook . flip per . plugins . network . Network Flip per Plugin Ċ import Ġcom . facebook . flip per . plugins . shared preferences . SharedPreferences Flip per Plugin Ċ import Ġcom . facebook . so loader . So Loader Ċ import Ġcom . sn ip ed . core . config . AppConfig Ċ import Ġokhttp 3 . Ok HttpClient Ċ import Ġokhttp 3 . logging . Http Logging Interceptor Ċ Ċ /** Ċ Ġ* ĠDebug ging Ġand Ġlogging Ġhandler . Ċ Ġ* ĠThe Ġimplementation Ġis Ġexclusive Ġfor Ġdebug Ġbuilds . Ċ Ġ*/ Ċ object ĠDebugger Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġnetwork Plugin Ġ= ĠNetwork Flip per Plugin () ĊĊĠĠĠ Ġfun Ġattach To App ( app : ĠApplication ) Ġ{ ĊĠĠĠĠĠĠĠ ĠSo Loader . init ( app , Ġfalse ) ĊĊĠĠĠĠĠĠĠ Ġif Ġ( Flip per Utils . should Enable Flip per ( app )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġclient Ġ= ĠAndroid Flip per Client . getInstance ( app ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclient . add Plugin ( Inspector Flip per Plugin ( app , ĠDescriptor Mapping . with Defaults ())) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclient . add Plugin ( network Plugin ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclient . add Plugin ( SharedPreferences Flip per Plugin ( app , ĠApp Config . FILE _ NAME _ PRE FS )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclient . start () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġattach To Network ( ok HttpClient Builder : ĠOk HttpClient . Builder ) Ġ{ ĊĠĠĠĠĠĠĠ Ġok HttpClient Builder . add Interceptor ( Http Logging Interceptor (). setLevel ( Http Logging Interceptor . Level . BODY )) ĊĠĠĠĠĠĠĠ Ġok HttpClient Builder . add Network Interceptor ( Flip per Ok http Interceptor ( network Plugin )) ĊĠĠĠ Ġ} Ċ } Ċ