Skip to content

Commit 4af2d84

Browse files
author
qinhui
committed
Merge branch 'main' into dev/example-ci
2 parents 22b7d55 + a4428fb commit 4af2d84

File tree

66 files changed

+320
-330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+320
-330
lines changed

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/common/widget/WaveformView.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ private void init(AttributeSet attrs, int defStyle) {
6969

7070
private void initPainters() {
7171
mWavePaint = new Paint();
72-
mWavePaint.setColor(mWaveColor);// 画笔为color
73-
mWavePaint.setStrokeWidth(waveStrokeWidth);// 设置画笔粗细
72+
mWavePaint.setColor(mWaveColor);// Set paint color
73+
mWavePaint.setStrokeWidth(waveStrokeWidth);// Set paint stroke width
7474
mWavePaint.setAntiAlias(true);
7575
mWavePaint.setFilterBitmap(true);
7676
mWavePaint.setStrokeCap(Paint.Cap.ROUND);
7777
mWavePaint.setStyle(Paint.Style.FILL);
7878
Shader shader = new LinearGradient(0, 0, 1000, 0, 0xffffffff, 0xFFe850ee, Shader.TileMode.CLAMP);
7979
mWavePaint.setShader(shader);
8080
baseLinePaint = new Paint();
81-
baseLinePaint.setColor(mBaseLineColor);// 画笔为color
82-
baseLinePaint.setStrokeWidth(1f);// 设置画笔粗细
81+
baseLinePaint.setColor(mBaseLineColor);// Set paint color
82+
baseLinePaint.setStrokeWidth(1f);// Set paint stroke width
8383
baseLinePaint.setAntiAlias(true);
8484
baseLinePaint.setFilterBitmap(true);
8585
baseLinePaint.setStyle(Paint.Style.FILL);
@@ -145,7 +145,7 @@ public void setMaxConstant(boolean maxConstant) {
145145
}
146146

147147
/**
148-
* 如果改变相应配置 需要刷新相应的paint设置
148+
* If you change the corresponding configuration, you need to refresh the paint settings
149149
*/
150150
public void invalidateNow() {
151151
initPainters();

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/utils/DefaultPoolExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Executors
1717
*
1818
* @version 1.0
19-
* @since 16/4/28 下午4:07
19+
* @since 16/4/28 4:07 PM
2020
*/
2121
public class DefaultPoolExecutor extends ThreadPoolExecutor
2222
{

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/utils/DefaultThreadFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
* @author zhilong <a href="mailto:zhilong.liu@aliyun.com">Contact me.</a>
1414
* @version 1.0
15-
* @since 15/12/25 上午10:51
15+
* @since 15/12/25 10:51 AM
1616
*/
1717
public class DefaultThreadFactory implements ThreadFactory
1818
{

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/utils/FileUtils.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,27 @@ public static void copyFilesFromAssets(Context context, String assetsPath, Strin
3232
AssetManager assetManager = context.getAssets();
3333
try {
3434
File file = new File(storagePath);
35-
if (!file.exists()) {//如果文件夹不存在,则创建新的文件夹
35+
if (!file.exists()) {//If the folder does not exist, create a new folder
3636
file.mkdirs();
3737
}
3838

39-
// 获取assets目录下的所有文件及目录名
39+
// Get all file and directory names under assets
4040
String[] fileNames = assetManager.list(assetsPath);
41-
if (fileNames.length > 0) {//如果是目录 apk
41+
if (fileNames.length > 0) {//If it's a directory
4242
for (String fileName : fileNames) {
4343
if (!TextUtils.isEmpty(assetsPath)) {
44-
temp = assetsPath + SEPARATOR + fileName;//补全assets资源路径
44+
temp = assetsPath + SEPARATOR + fileName;//Complete assets resource path
4545
}
4646

4747
String[] childFileNames = assetManager.list(temp);
48-
if (!TextUtils.isEmpty(temp) && childFileNames.length > 0) {//判断是文件还是文件夹:如果是文件夹
48+
if (!TextUtils.isEmpty(temp) && childFileNames.length > 0) {//Check if it's a file or folder: if it's a folder
4949
copyFilesFromAssets(context, temp, storagePath + SEPARATOR + fileName);
50-
} else {//如果是文件
50+
} else {//If it's a file
5151
InputStream inputStream = assetManager.open(temp);
5252
readInputStream(storagePath + SEPARATOR + fileName, inputStream);
5353
}
5454
}
55-
} else {//如果是文件 doc_test.txt或者apk/app_test.apk
55+
} else {//If it's a file like doc_test.txt or apk/app_test.apk
5656
InputStream inputStream = assetManager.open(assetsPath);
5757
if (assetsPath.contains(SEPARATOR)) {//apk/app_test.apk
5858
assetsPath = assetsPath.substring(assetsPath.lastIndexOf(SEPARATOR), assetsPath.length());
@@ -66,27 +66,27 @@ public static void copyFilesFromAssets(Context context, String assetsPath, Strin
6666
}
6767

6868
/**
69-
* 读取输入流中的数据写入输出流
69+
* Read data from input stream and write to output stream
7070
*
71-
* @param storagePath 目标文件路径
72-
* @param inputStream 输入流
71+
* @param storagePath Target file path
72+
* @param inputStream Input stream
7373
*/
7474
public static void readInputStream(String storagePath, InputStream inputStream) {
7575
File file = new File(storagePath);
7676
try {
7777
if (!file.exists()) {
78-
// 1.建立通道对象
78+
// 1. Create channel object
7979
FileOutputStream fos = new FileOutputStream(file);
80-
// 2.定义存储空间
80+
// 2. Define storage space
8181
byte[] buffer = new byte[inputStream.available()];
82-
// 3.开始读文件
82+
// 3. Start reading file
8383
int lenght = 0;
84-
while ((lenght = inputStream.read(buffer)) != -1) {// 循环从输入流读取buffer字节
85-
// 将Buffer中的数据写到outputStream对象中
84+
while ((lenght = inputStream.read(buffer)) != -1) {// Read buffer bytes from input stream in a loop
85+
// Write data from Buffer to outputStream object
8686
fos.write(buffer, 0, lenght);
8787
}
88-
fos.flush();// 刷新缓冲区
89-
// 4.关闭流
88+
fos.flush();// Flush buffer
89+
// 4. Close streams
9090
fos.close();
9191
inputStream.close();
9292
}

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/utils/YUVUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public static byte[] toWrappedI420(ByteBuffer bufferY,
184184
return out;
185185
}
186186
/**
187-
* I420转nv21
187+
* Convert I420 to NV21
188188
*/
189189
public static byte[] I420ToNV21(byte[] data, int width, int height) {
190190
byte[] ret = new byte[data.length];

Android/APIExample-Audio/app/src/main/res/layout/fragment_ready_layout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
android:layout_marginTop="24dp"
1313
android:layout_marginEnd="24dp"
1414
android:textSize="17sp"
15-
android:text="此示例演示了如何使用SDK进行语音通话的功能。"/>
15+
android:text="@string/the_example_feature_tips"/>
1616

1717
<androidx.appcompat.widget.AppCompatButton
1818
android:id="@+id/next"

Android/APIExample-Audio/app/src/main/res/values-zh/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,5 @@
8686
<string name="audio_route_headset_typec">耳机(TypeC)</string>
8787
<string name="audio_route_headset_bluetooth">蓝牙耳机</string>
8888
<string name="notifications_enable_tip">请打开通知权限,防止后台录音中断</string>
89+
<string name="the_example_feature_tips">此示例演示了如何使用SDK进行语音通话的功能。</string>
8990
</resources>

Android/APIExample-Audio/app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,5 @@
9494
<string name="audio_route_headset_typec">headset(TypeC)</string>
9595
<string name="audio_route_headset_bluetooth">bluetooth headset</string>
9696
<string name="notifications_enable_tip">Please turn on notification permission to prevent background recording from being interrupted.</string>
97+
<string name="the_example_feature_tips">This example demonstrates how to use the SDK to implement voice call functionality.</string>
9798
</resources>

Android/APIExample-Compose/app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ android {
3535
properties.load(rootProject.file("local.properties").inputStream())
3636
val AGORA_APP_ID = properties.getProperty("AGORA_APP_ID", "")
3737
if (AGORA_APP_ID == "") {
38-
throw GradleException("请在项目根目录下local.properties文件里正确配置:AGORA_APP_ID=<您的声网AppId>")
38+
throw GradleException("Please configure correctly in the local.properties file in the project root directory: AGORA_APP_ID=<Your Agora AppId>")
3939
}
4040
val AGORA_APP_CERT = properties.getProperty("AGORA_APP_CERT", "")
4141
buildConfigField("String", "AGORA_APP_ID", "\"$AGORA_APP_ID\"")

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/ChannelEncryption.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fun ChannelEncryption() {
172172
val allGranted = grantedMap.values.all { it }
173173
if (allGranted) {
174174
// Permission is granted
175-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
175+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
176176

177177
val encryptionConfig = EncryptionConfig()
178178
encryptionConfig.encryptionMode = encryptionMode
@@ -194,7 +194,7 @@ fun ChannelEncryption() {
194194
}
195195
} else {
196196
// Permission is denied
197-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
197+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
198198
}
199199
}
200200

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/CustomAudioRender.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import androidx.compose.ui.platform.LocalLifecycleOwner
2727
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
2828
import androidx.compose.ui.unit.dp
2929
import io.agora.api.example.compose.BuildConfig
30+
import io.agora.api.example.compose.R
3031
import io.agora.api.example.compose.data.SettingPreferences
3132
import io.agora.api.example.compose.ui.common.AudioGrid
3233
import io.agora.api.example.compose.ui.common.AudioStatsInfo
@@ -160,7 +161,7 @@ fun CustomAudioRender() {
160161
val allGranted = grantedMap.values.all { it }
161162
if (allGranted) {
162163
// Permission is granted
163-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
164+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
164165
val mediaOptions = ChannelMediaOptions()
165166
mediaOptions.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING
166167
mediaOptions.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER
@@ -171,7 +172,7 @@ fun CustomAudioRender() {
171172

172173
} else {
173174
// Permission is denied
174-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
175+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
175176
}
176177
}
177178

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/CustomAudioSource.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ fun CustomAudioSource() {
140140
val allGranted = grantedMap.values.all { it }
141141
if (allGranted) {
142142
// Permission is granted
143-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
143+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
144144
option.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING
145145
option.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER
146146
option.publishMicrophoneTrack = false
@@ -150,7 +150,7 @@ fun CustomAudioSource() {
150150

151151
} else {
152152
// Permission is denied
153-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
153+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
154154
}
155155
}
156156
CustomAudioSourceView(

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/CustomVideoRender.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import androidx.compose.ui.platform.LocalContext
2323
import androidx.compose.ui.platform.LocalLifecycleOwner
2424
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
2525
import io.agora.api.example.compose.BuildConfig
26+
import io.agora.api.example.compose.R
2627
import io.agora.api.example.compose.data.SettingPreferences
2728
import io.agora.api.example.compose.ui.common.ChannelNameInput
2829
import io.agora.api.example.compose.ui.common.TwoVideoView
@@ -134,7 +135,7 @@ fun CustomVideoRender() {
134135
val allGranted = grantedMap.values.all { it }
135136
if (allGranted) {
136137
// Permission is granted
137-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
138+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
138139
val mediaOptions = ChannelMediaOptions()
139140
mediaOptions.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING
140141
mediaOptions.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER
@@ -143,7 +144,7 @@ fun CustomVideoRender() {
143144
}
144145
} else {
145146
// Permission is denied
146-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
147+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
147148
}
148149
}
149150

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/CustomVideoSource.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import androidx.compose.ui.platform.LocalContext
2222
import androidx.compose.ui.platform.LocalLifecycleOwner
2323
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
2424
import io.agora.api.example.compose.BuildConfig
25+
import io.agora.api.example.compose.R
2526
import io.agora.api.example.compose.data.SettingPreferences
2627
import io.agora.api.example.compose.ui.common.ChannelNameInput
2728
import io.agora.api.example.compose.ui.common.DropdownMenuRaw
@@ -171,7 +172,7 @@ fun CustomVideoSource() {
171172
val allGranted = grantedMap.values.all { it }
172173
if (allGranted) {
173174
// Permission is granted
174-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
175+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
175176
val mediaOptions = ChannelMediaOptions()
176177
mediaOptions.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING
177178
mediaOptions.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER
@@ -185,7 +186,7 @@ fun CustomVideoSource() {
185186
externalVideoFramePusher.start()
186187
} else {
187188
// Permission is denied
188-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
189+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
189190
}
190191
}
191192

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/HostAcrossChannel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ fun HostAcrossChannel() {
183183
val allGranted = grantedMap.values.all { it }
184184
if (allGranted) {
185185
// Permission is granted
186-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
186+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
187187
val mediaOptions = ChannelMediaOptions()
188188
mediaOptions.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING
189189
mediaOptions.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER
@@ -196,7 +196,7 @@ fun HostAcrossChannel() {
196196
}
197197
} else {
198198
// Permission is denied
199-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
199+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
200200
}
201201
}
202202

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/JoinChannelAudio.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import androidx.compose.ui.platform.LocalSoftwareKeyboardController
2828
import androidx.compose.ui.tooling.preview.Preview
2929
import androidx.compose.ui.unit.dp
3030
import io.agora.api.example.compose.BuildConfig
31+
import io.agora.api.example.compose.R
3132
import io.agora.api.example.compose.data.SettingPreferences
3233
import io.agora.api.example.compose.ui.common.AudioGrid
3334
import io.agora.api.example.compose.ui.common.AudioStatsInfo
@@ -126,7 +127,7 @@ fun JoinChannelAudio() {
126127
val allGranted = grantedMap.values.all { it }
127128
if (allGranted) {
128129
// Permission is granted
129-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
130+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
130131
val mediaOptions = ChannelMediaOptions()
131132
mediaOptions.publishCameraTrack = false
132133
mediaOptions.publishMicrophoneTrack = true
@@ -138,7 +139,7 @@ fun JoinChannelAudio() {
138139

139140
} else {
140141
// Permission is denied
141-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
142+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
142143
}
143144
}
144145

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/JoinChannelVideo.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import androidx.compose.ui.platform.LocalSoftwareKeyboardController
2727
import androidx.compose.ui.tooling.preview.Preview
2828
import androidx.compose.ui.unit.dp
2929
import io.agora.api.example.compose.BuildConfig
30+
import io.agora.api.example.compose.R
3031
import io.agora.api.example.compose.data.SettingPreferences
3132
import io.agora.api.example.compose.ui.common.ChannelNameInput
3233
import io.agora.api.example.compose.ui.common.VideoGrid
@@ -151,7 +152,7 @@ fun JoinChannelVideo() {
151152
val allGranted = grantedMap.values.all { it }
152153
if (allGranted) {
153154
// Permission is granted
154-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
155+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
155156
val mediaOptions = ChannelMediaOptions()
156157
mediaOptions.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING
157158
mediaOptions.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER
@@ -161,7 +162,7 @@ fun JoinChannelVideo() {
161162

162163
} else {
163164
// Permission is denied
164-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
165+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
165166
}
166167
}
167168

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/JoinChannelVideoToken.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import androidx.compose.ui.platform.LocalSoftwareKeyboardController
3131
import androidx.compose.ui.tooling.preview.Preview
3232
import androidx.compose.ui.unit.dp
3333
import io.agora.api.example.compose.BuildConfig
34+
import io.agora.api.example.compose.R
3435
import io.agora.api.example.compose.data.SettingPreferences
3536
import io.agora.api.example.compose.ui.common.ChannelNameInput
3637
import io.agora.api.example.compose.ui.common.VideoGrid
@@ -154,15 +155,15 @@ fun JoinChannelVideoToken() {
154155
val allGranted = grantedMap.values.all { it }
155156
if (allGranted) {
156157
// Permission is granted
157-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
158+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
158159
val mediaOptions = ChannelMediaOptions()
159160
mediaOptions.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING
160161
mediaOptions.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER
161162
rtcEngine.joinChannel(token, channelName, 0, mediaOptions)
162163

163164
} else {
164165
// Permission is denied
165-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
166+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
166167
}
167168
}
168169

Android/APIExample-Compose/app/src/main/java/io/agora/api/example/compose/samples/JoinMultiChannel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ fun JoinMultiChannel() {
156156
super.onLocalAudioStateChanged(state, reason)
157157
if (state == Constants.LOCAL_AUDIO_STREAM_STATE_STOPPED) {
158158
mainHandler.post {
159-
Toast.makeText(context, "麦克风已关闭", Toast.LENGTH_SHORT).show()
159+
Toast.makeText(context, "Microphone is turned off", Toast.LENGTH_SHORT).show()
160160
}
161161
}
162162
}
@@ -174,7 +174,7 @@ fun JoinMultiChannel() {
174174
val allGranted = grantedMap.values.all { it }
175175
if (allGranted) {
176176
// Permission is granted
177-
Toast.makeText(context, "Permission Granted", Toast.LENGTH_LONG).show()
177+
Toast.makeText(context, R.string.permission_granted, Toast.LENGTH_LONG).show()
178178
val options = ChannelMediaOptions()
179179
options.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING
180180
options.clientRoleType = Constants.CLIENT_ROLE_AUDIENCE
@@ -196,7 +196,7 @@ fun JoinMultiChannel() {
196196
}
197197
} else {
198198
// Permission is denied
199-
Toast.makeText(context, "Permission Denied", Toast.LENGTH_LONG).show()
199+
Toast.makeText(context, R.string.permission_denied, Toast.LENGTH_LONG).show()
200200
}
201201
}
202202

0 commit comments

Comments
 (0)