[Android] Enter waiting room flow

 

 

 

To access a waiting room, individuals must first log into the Vsee system with their patient account, SSO token or guest.

1. Authentication

1.1. Patient authentication

Patient login
val res = VseeApi.auth.loginAsPatient(username = username, password = password) when (res) { is Resource.Success -> {} is Resource.Error -> {} }

The sample app uses loginAsPatient API to verify the patient’s authentication.

 

1.2. Guest authentication

fun loginAsGuest(firstName: String, lastName: String, dob: String) { viewModelScope.launch { val res = VseeApi.auth.loginAsGuest(firstName = firstName, lastName = lastName, dob = dob) when (res) { is Resource.Success -> {} is Resource.Error -> Timber.e("Login SSO error: ${res.message}") } } }

For the guets authentication, user needs to input their firstName, lastName and date of birth.

1.3. SSO authentication

fun loginWithToken(token: String) { viewModelScope.launch { val res = VseeApi.userApi.getUser() when (res) { is Resource.Success -> {} is Resource.Error -> { Timber.e("Get user using SSO token error: ${res.message}") _errorMessage.postValue(res.message ?: "Login using SSO token error") } } } }

The sample app uses VseeApi.userApi.getUser() to verify the SSO token.

 

The authentication result can be Success or Error.

  • Success: The app starts doing vseeKit authentication

VseeKit is a library that allows developers to embed VSee multi-way video calling and chat functionality into their mobile apps.

EventBus is used by the application to monitor VseeKit login results:

After login VseeKit is success, the user will be redirected to Dashboard screen:


 

  • Error: The app shows a Snackbar message with detailed information about the error.

 

2. Create intake

Patient clicks on the Enter waiting room now button to open the Intake form screen. At this screen, patient can update medical information for the visit such as: reason, consultation…

Please refers to Visit and intake API for more detailed information.

 

 

3. Join video call

Patient has 2 options to join the video call:

  • Embedded Browser call: open video call by using Android WebView

  • Via VseeKit: open video call by using VseeKit native video view

The app only needs to pass a VisitResponse data to startVideoCall function

 

4. In video call

The patient waits for their provider to join the video call.

Â