File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
sample-app-basic/src/main/java/io/livekit/android/sample/basic Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package io.livekit.android.sample.basic
1919import android.Manifest
2020import android.content.pm.PackageManager
2121import android.os.Bundle
22+ import android.util.Log
2223import android.view.View
2324import android.widget.Toast
2425import androidx.activity.result.contract.ActivityResultContracts
@@ -71,10 +72,15 @@ class MainActivity : AppCompatActivity() {
7172 }
7273
7374 // Connect to server.
74- room.connect(
75- url,
76- token,
77- )
75+ try {
76+ room.connect(
77+ url,
78+ token,
79+ )
80+ } catch (e: Exception ) {
81+ Log .e(" MainActivity" , " Error while connecting to server:" , e)
82+ return @launch
83+ }
7884
7985 // Turn on audio/video recording.
8086 val localParticipant = room.localParticipant
You can’t perform that action at this time.
0 commit comments