package Ġchat . rocket . android . video conference . ui Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġchat . rocket . android . video conference . presenter . J its i Video Conference View Ċ import Ġchat . rocket . android . video conference . presenter . Video Conference Presenter Ċ import Ġdagger . android . Android Injection Ċ import Ġorg . j its i . meet . sdk . J its i Me et Activity Ċ import Ġorg . j its i . meet . sdk . J its i Me et Conference Options Ċ import Ġorg . j its i . meet . sdk . J its i Me et View Ċ import Ġorg . j its i . meet . sdk . J its i Me et View Listener Ċ import Ġtim ber . log . Tim ber Ċ import Ġjava . net . URL Ċ import Ġjavax . inject . Inject Ċ Ċ fun ĠContext . video Conference Intent ( chat Room Id : ĠString , Ġchat Room Type : ĠString ): ĠIntent Ġ= ĊĠĠĠĠĠĠĠ ĠIntent ( this , ĠVideo Conference Activity :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. putExtra ( INT ENT _ CHAT _ ROOM _ ID , Ġchat Room Id ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. putExtra ( INT ENT _ CHAT _ ROOM _ TYPE , Ġchat Room Type ) Ċ Ċ private Ġconst Ġval ĠINTENT _ CHAT _ ROOM _ ID Ġ= Ġ" chat _ room _ id " Ċ private Ġconst Ġval ĠINTENT _ CHAT _ ROOM _ TYPE Ġ= Ġ" chat _ room _ type " Ċ Ċ class ĠVideo Conference Activity Ġ: ĠJ its i Me et Activity (), ĠJ its i Video Conference View , ĊĠĠĠĠĠĠĠ ĠJ its i Me et View Listener Ġ{ ĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġpresenter : ĠVideo Conference Presenter ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġchat Room Id : ĠString ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġchat Room Type : ĠString ĊĠĠĠ Ġprivate Ġvar Ġview : ĠJ its i Me et View ? Ġ= Ġnull ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ ĠAndroid Injection . inject ( this ) ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġchat Room Id Ġ= Ġintent . getString Extra ( INT ENT _ CHAT _ ROOM _ ID ) ĊĠĠĠĠĠĠĠ Ġchat Room Type Ġ= Ġintent . getString Extra ( INT ENT _ CHAT _ ROOM _ TYPE ) ĊĊĠĠĠĠĠĠĠ Ġview Ġ= ĠJ its i Me et View ( this ) ĊĠĠĠĠĠĠĠ Ġview ?. listener Ġ= Ġthis ĊĠĠĠĠĠĠĠ ĠsetContentView ( view ) ĊĊĠĠĠĠĠĠĠ Ġpresenter . setup ( chat Room Id , Ġchat Room Type ) ĊĠĠĠĠĠĠĠ Ġpresenter . init Video Conference () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Conference Will Join ( map : ĠMutable Map < String , ĠAny > ?) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlog J its i Me et ViewState (" Join ing Ġvideo Ġcon fer encing ", Ġmap ) ĊĊĠĠĠ Ġoverride Ġfun Ġon Conference Joined ( map : ĠMutable Map < String , ĠAny > ?) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlog J its i Me et ViewState (" Joined Ġvideo Ġcon fer encing ", Ġmap ) ĊĊĠĠĠ Ġoverride Ġfun Ġon Conference Terminated ( map : ĠMutable Map < String , ĠAny > ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġmap ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( it . containsKey (" error ")) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġlog J its i Me et ViewState (" Terminated Ġvideo Ġcon fer encing Ġwith Ġerror ", Ġmap ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġlog J its i Me et ViewState (" Terminated Ġvideo Ġcon fer encing ", Ġmap ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġfinish J its i Video Conference () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġstart J its i Video Conference ( url : ĠString , Ġname : ĠString ?) Ġ{ ĊĠĠĠĠĠĠĠ ĠJ its i Me et Conference Options . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Audio Mut ed ( true ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Video Mut ed ( true ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Server URL ( URL ( url )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Audio Only ( false ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build (). let Ġ{ Ġview ?. join ( it ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġfinish J its i Video Conference () Ġ{ ĊĠĠĠĠĠĠĠ Ġpresenter . invalidate Timer () ĊĠĠĠĠĠĠĠ Ġview ?. dispose () ĊĠĠĠĠĠĠĠ Ġview Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġfinish () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġlog J its i Me et ViewState ( message : ĠString , Ġmap : ĠMutable Map < String , ĠAny > ?) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTim ber . i ("$ message : Ġ Ġ$ map ") Ċ } Ċ