package Ġme . he gj . w android . mvp . model . start Ċ Ċ import Ġandroid . app . Application Ċ import Ġcom . google . gson . Gson Ċ import Ġcom . j ess . arms . di . scope . Activity Scope Ċ import Ġcom . j ess . arms . integration . I Repository Manager Ċ import Ġcom . j ess . arms . mvp . BaseModel Ċ import Ġio . reactivex . Observable Ċ import Ġme . he gj . w android . mvp . contract . start . Login Contract Ċ import Ġme . he gj . w android . mvp . model . api . Api Ċ import Ġme . he gj . w android . mvp . model . entity . ApiResponse Ċ import Ġme . he gj . w android . mvp . model . entity . UserInfo Response Ċ import Ġjavax . inject . Inject ĊĊ Ċ /** Ċ Ġ* Ġ================================= =============== Ċ Ġ* ĠDescription : Ċ Ġ* Ġ< p > Ċ Ġ* ĠCreated Ġby ĠM VP Ar ms Template Ġon Ġ 0 7 / 0 5 / 2 0 1 9 Ġ 1 6 : 5 9 Ċ Ġ* Ġ< a Ġhref =" mailto : j ess . yan . eff ort @ gmail . com "> Contact Ġme </ a > Ċ Ġ* Ġ< a Ġhref =" https :// github . com / J ess Y an Coding "> Follow Ġme </ a > Ċ Ġ* Ġ< a Ġhref =" https :// github . com / J ess Y an Coding / M VP Ar ms "> Star Ġme </ a > Ċ Ġ* Ġ< a Ġhref =" https :// github . com / J ess Y an Coding / M VP Ar ms / wiki "> See Ġme </ a > Ċ Ġ* Ġ< a Ġhref =" https :// github . com / J ess Y an Coding / M VP Ar ms Template "> æ¨¡ çīĪ è¯· ä¿ĿæĮģ æĽ´æĸ° </ a > Ċ Ġ* Ġ================================= =============== Ċ Ġ*/ Ċ @ Activity Scope Ċ class ĠLogin Model Ċ @ Inject Ċ constructor ( repository Manager : ĠI Repository Manager ) Ġ: ĠBase Model ( repository Manager ), ĠLogin Contract . Model Ġ{ ĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġm Gson : ĠGson ĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġm Application : ĠApplication ĊĊĠĠĠ Ġoverride Ġfun Ġregister ( username : ĠString , Ġpassword : ĠString , Ġpassword 1 : ĠString ): ĠObservable < ApiResponse < Any >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġm Repository Manager ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. obtain Ret rofit Service ( Api :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. register ( username , Ġpassword , Ġpassword 1 ) ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġoverride Ġfun Ġlogin ( username : ĠString , Ġpassword : ĠString ): ĠObservable < ApiResponse < UserInfo Response >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġm Repository Manager ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. obtain Ret rofit Service ( Api :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. login ( username , Ġpassword ) ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġoverride Ġfun Ġon Destroy () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Destroy () ĊĠĠĠ Ġ} Ċ } Ċ