package Ġcom . example . my vide oc all app Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . activity . view Models Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . recyclerview . widget . Grid LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . example . my vide oc all app . vide oc all . list . Peer Adapter Ċ Ċ const Ġval ĠB UNDLE _ AUTH _ TOKEN Ġ= Ġ" 1 0 0 ms - auth - token - bundle - key " Ċ const Ġval ĠB UNDLE _ NAME Ġ= Ġ" 1 0 0 ms - user - name - bundle - key " Ċ Ċ class ĠVideo Call Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĠĠĠ Ġprivate Ġval ĠTAG Ġ= ĠVideo Call Activity :: class . java . simple Name ĊĠĠĠ Ġprivate Ġval Ġpeer Adapter Ġ= ĠPeer Adapter () ĊĠĠĠ Ġprivate Ġval ĠNUM _ PE ERS _ PER _ ROW Ġ= Ġ 2 ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ video _ call ) ĊĠĠĠĠĠĠĠ Ġval Ġauth Token Ġ= Ġintent ?. extras ?. getString ( B UNDLE _ AUTH _ TOKEN ) ĊĠĠĠĠĠĠĠ Ġval Ġname Ġ= Ġintent ?. extras ?. getString ( B UNDLE _ NAME ) ĊĊĠĠĠĠĠĠĠ Ġval Ġvm : ĠVideo Call Vm Ġby Ġview Models Ġ{ ĠVideo Call ViewModel Factory ( name , Ġauth Token , Ġapplication ) Ġ} ĊĊĠĠĠĠĠĠĠ ĠfindViewById < RecyclerView >( R . id . re cyclerView ). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlayout Manager Ġ= ĠGrid LayoutManager ( this @ Video Call Activity , ĠNUM _ PE ERS _ PER _ ROW ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter Ġ= Ġpeer Adapter ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġvm . video Call Participants . observe ( this , Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpeer Adapter . submit List ( it ) ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} Ċ }