File tree Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import androidx.core.content.res.ResourcesCompat
8
8
import androidx.core.widget.doAfterTextChanged
9
9
import androidx.navigation.fragment.findNavController
10
10
import io.agora.ktvapi.KTVSingRole
11
+ import io.agora.ktvdemo.BuildConfig
11
12
import io.agora.ktvdemo.rtc.IChannelEventListener
12
13
import io.agora.ktvdemo.R
13
14
import io.agora.ktvdemo.rtc.RtcEngineController
@@ -60,6 +61,14 @@ class MainFragment : BaseFragment<FragmentMainBinding>() {
60
61
61
62
// 开始体验按钮
62
63
btnStartChorus.setOnClickListener {
64
+ if (BuildConfig .AGORA_APP_ID .isEmpty()) {
65
+ toast(getString(R .string.app_appid_check))
66
+ return @setOnClickListener
67
+ }
68
+ if (! KeyCenter .isNormalChorus && BuildConfig .RESTFUL_API_KEY .isEmpty()) {
69
+ toast(getString(R .string.app_restful_check))
70
+ return @setOnClickListener
71
+ }
63
72
if (KeyCenter .channelId.isEmpty()){
64
73
toast(getString(R .string.app_input_channel_name))
65
74
return @setOnClickListener
Original file line number Diff line number Diff line change 22
22
<string name =" app_normal_ktvapi_tag" >独唱、小合唱</string >
23
23
<string name =" app_giant_ktvapi_tag" >大合唱</string >
24
24
<string name =" app_start_enjoy_tag" >开始体验</string >
25
+ <string name =" app_appid_check" >请检查 gradle.properties 文件内 APPID APP 证书是否正确填写</string >
26
+ <string name =" app_restful_check" >请检查 gradle.properties 文件内 RESTFUL API KEY 是否正确填写</string >
25
27
</resources >
Original file line number Diff line number Diff line change 21
21
<string name =" app_normal_ktvapi_tag" >独唱、小合唱</string >
22
22
<string name =" app_giant_ktvapi_tag" >大合唱</string >
23
23
<string name =" app_start_enjoy_tag" >开始体验</string >
24
+ <string name =" app_appid_check" >请检查 gradle.properties 文件内 APPID APP 证书是否正确填写</string >
25
+ <string name =" app_restful_check" >请检查 gradle.properties 文件内 RESTFUL API KEY 是否正确填写</string >
24
26
</resources >
Original file line number Diff line number Diff line change @@ -31,6 +31,6 @@ TOOLBOX_SERVER_HOST=https://service.agora.io/toolbox
31
31
AGORA_APP_ID =
32
32
AGORA_APP_CERTIFICATE =
33
33
34
- # Restful Api Config
34
+ # Restful Api Config (Giant Chorus Only)
35
35
RESTFUL_API_KEY =
36
36
RESTFUL_API_SECRET =
You can’t perform that action at this time.
0 commit comments