Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
R
RoomDemo
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ubains-android-demo
RoomDemo
Commits
352a6c39
提交
352a6c39
authored
6月 24, 2019
作者:
汪显鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
瞩目SDK 第二次提交
上级
47b14e56
流水线
#229
已失败 于阶段
变更
1
流水线
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
242 行增加
和
242 行删除
+242
-242
MainActivity.java
...2/src/main/java/com/android/sdkexample2/MainActivity.java
+242
-242
没有找到文件。
example2/src/main/java/com/android/sdkexample2/MainActivity.java
浏览文件 @
352a6c39
...
@@ -73,7 +73,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -73,7 +73,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
sdk
.
initSDK
(
this
,
APP_KEY
,
APP_SECRET
,
WEB_DOMAIN
,
this
);
sdk
.
initSDK
(
this
,
APP_KEY
,
APP_SECRET
,
WEB_DOMAIN
,
this
);
// }
// }
if
(
sdk
.
isInitialized
())
{
if
(
sdk
.
isInitialized
())
{
registerMeetingServiceListener
();
registerMeetingServiceListener
();
}
}
}
}
...
@@ -82,9 +82,9 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -82,9 +82,9 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
viewTabWelcome
=
findViewById
(
R
.
id
.
viewTabWelcome
);
viewTabWelcome
=
findViewById
(
R
.
id
.
viewTabWelcome
);
viewTabMeeting
=
findViewById
(
R
.
id
.
viewTabMeeting
);
viewTabMeeting
=
findViewById
(
R
.
id
.
viewTabMeeting
);
viewTabPage2
=
findViewById
(
R
.
id
.
viewTabPage2
);
viewTabPage2
=
findViewById
(
R
.
id
.
viewTabPage2
);
btnTabWelcome
=
(
Button
)
findViewById
(
R
.
id
.
btnTabWelcome
);
btnTabWelcome
=
(
Button
)
findViewById
(
R
.
id
.
btnTabWelcome
);
btnTabMeeting
=
(
Button
)
findViewById
(
R
.
id
.
btnTabMeeting
);
btnTabMeeting
=
(
Button
)
findViewById
(
R
.
id
.
btnTabMeeting
);
btnTabPage2
=
(
Button
)
findViewById
(
R
.
id
.
btnTabPage2
);
btnTabPage2
=
(
Button
)
findViewById
(
R
.
id
.
btnTabPage2
);
selectTab
(
TAB_WELCOME
);
selectTab
(
TAB_WELCOME
);
...
@@ -108,32 +108,32 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -108,32 +108,32 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
}
}
private
void
selectTab
(
int
tabId
)
{
private
void
selectTab
(
int
tabId
)
{
if
(
tabId
==
TAB_WELCOME
)
{
if
(
tabId
==
TAB_WELCOME
)
{
viewTabWelcome
.
setVisibility
(
View
.
VISIBLE
);
viewTabWelcome
.
setVisibility
(
View
.
VISIBLE
);
viewTabMeeting
.
setVisibility
(
View
.
GONE
);
viewTabMeeting
.
setVisibility
(
View
.
GONE
);
viewTabPage2
.
setVisibility
(
View
.
GONE
);
viewTabPage2
.
setVisibility
(
View
.
GONE
);
btnTabWelcome
.
setSelected
(
true
);
btnTabWelcome
.
setSelected
(
true
);
btnTabMeeting
.
setSelected
(
false
);
btnTabMeeting
.
setSelected
(
false
);
btnTabPage2
.
setSelected
(
false
);
btnTabPage2
.
setSelected
(
false
);
}
else
if
(
tabId
==
TAB_PAGE_2
)
{
}
else
if
(
tabId
==
TAB_PAGE_2
)
{
viewTabWelcome
.
setVisibility
(
View
.
GONE
);
viewTabWelcome
.
setVisibility
(
View
.
GONE
);
viewTabMeeting
.
setVisibility
(
View
.
GONE
);
viewTabMeeting
.
setVisibility
(
View
.
GONE
);
viewTabPage2
.
setVisibility
(
View
.
VISIBLE
);
viewTabPage2
.
setVisibility
(
View
.
VISIBLE
);
btnTabWelcome
.
setSelected
(
false
);
btnTabWelcome
.
setSelected
(
false
);
btnTabMeeting
.
setSelected
(
false
);
btnTabMeeting
.
setSelected
(
false
);
btnTabPage2
.
setSelected
(
true
);
btnTabPage2
.
setSelected
(
true
);
}
else
if
(
tabId
==
TAB_MEETING
)
{
}
else
if
(
tabId
==
TAB_MEETING
)
{
ZHUMUSdk
sdk
=
ZHUMUSdk
.
getInstance
();
ZHUMUSdk
sdk
=
ZHUMUSdk
.
getInstance
();
if
(!
sdk
.
isInitialized
())
{
if
(!
sdk
.
isInitialized
())
{
Toast
.
makeText
(
this
,
"ZHUMUSDK has not been initialized successfully"
,
Toast
.
LENGTH_LONG
).
show
();
Toast
.
makeText
(
this
,
"ZHUMUSDK has not been initialized successfully"
,
Toast
.
LENGTH_LONG
).
show
();
return
;
return
;
}
}
ZHUMUMeetingService
meetingService
=
sdk
.
getMeetingService
();
ZHUMUMeetingService
meetingService
=
sdk
.
getMeetingService
();
if
(
meetingService
==
null
)
if
(
meetingService
==
null
)
return
;
return
;
if
(
meetingService
.
getMeetingStatus
()
.
equals
(
ZHUMUMeetingStatus
.
MEETING_STATUS_IDLE
)
)
{
if
(
meetingService
.
getMeetingStatus
().
equals
(
ZHUMUMeetingStatus
.
MEETING_STATUS_IDLE
))
{
viewTabWelcome
.
setVisibility
(
View
.
GONE
);
viewTabWelcome
.
setVisibility
(
View
.
GONE
);
viewTabPage2
.
setVisibility
(
View
.
GONE
);
viewTabPage2
.
setVisibility
(
View
.
GONE
);
...
@@ -156,11 +156,11 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -156,11 +156,11 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
super
.
onNewIntent
(
intent
);
super
.
onNewIntent
(
intent
);
// disable animation
// disable animation
overridePendingTransition
(
0
,
0
);
overridePendingTransition
(
0
,
0
);
String
action
=
intent
.
getAction
();
String
action
=
intent
.
getAction
();
if
(
ACTION_RETURN_FROM_MEETING
.
equals
(
action
))
{
if
(
ACTION_RETURN_FROM_MEETING
.
equals
(
action
))
{
int
tabId
=
intent
.
getIntExtra
(
EXTRA_TAB_ID
,
TAB_WELCOME
);
int
tabId
=
intent
.
getIntExtra
(
EXTRA_TAB_ID
,
TAB_WELCOME
);
selectTab
(
tabId
);
selectTab
(
tabId
);
}
}
...
@@ -170,7 +170,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -170,7 +170,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
public
void
onZHUMUSdkInitializeResult
(
int
errorCode
,
int
internalErrorCode
)
{
public
void
onZHUMUSdkInitializeResult
(
int
errorCode
,
int
internalErrorCode
)
{
Log
.
i
(
TAG
,
"onZHUMUSdkInitializeResult, errorCode="
+
errorCode
+
", internalErrorCode="
+
internalErrorCode
);
Log
.
i
(
TAG
,
"onZHUMUSdkInitializeResult, errorCode="
+
errorCode
+
", internalErrorCode="
+
internalErrorCode
);
if
(
errorCode
!=
ZHUMUError
.
ERROR_SUCCESS
)
{
if
(
errorCode
!=
ZHUMUError
.
ERROR_SUCCESS
)
{
Toast
.
makeText
(
this
,
"Failed to initialize ZHUMUSDK. Error: "
+
errorCode
+
", internalErrorCode="
+
internalErrorCode
,
Toast
.
LENGTH_LONG
);
Toast
.
makeText
(
this
,
"Failed to initialize ZHUMUSDK. Error: "
+
errorCode
+
", internalErrorCode="
+
internalErrorCode
,
Toast
.
LENGTH_LONG
);
}
else
{
}
else
{
Toast
.
makeText
(
this
,
"Initialize ZHUMUSDK successfully."
,
Toast
.
LENGTH_LONG
).
show
();
Toast
.
makeText
(
this
,
"Initialize ZHUMUSDK successfully."
,
Toast
.
LENGTH_LONG
).
show
();
...
@@ -182,7 +182,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -182,7 +182,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
private
void
registerMeetingServiceListener
()
{
private
void
registerMeetingServiceListener
()
{
ZHUMUSdk
sdk
=
ZHUMUSdk
.
getInstance
();
ZHUMUSdk
sdk
=
ZHUMUSdk
.
getInstance
();
ZHUMUMeetingService
meetingService
=
sdk
.
getMeetingService
();
ZHUMUMeetingService
meetingService
=
sdk
.
getMeetingService
();
if
(
meetingService
!=
null
)
{
if
(
meetingService
!=
null
)
{
meetingService
.
addListener
(
this
);
meetingService
.
addListener
(
this
);
}
}
}
}
...
@@ -191,7 +191,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -191,7 +191,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
protected
void
onDestroy
()
{
protected
void
onDestroy
()
{
ZHUMUSdk
sdk
=
ZHUMUSdk
.
getInstance
();
ZHUMUSdk
sdk
=
ZHUMUSdk
.
getInstance
();
if
(
sdk
.
isInitialized
())
{
if
(
sdk
.
isInitialized
())
{
ZHUMUMeetingService
meetingService
=
sdk
.
getMeetingService
();
ZHUMUMeetingService
meetingService
=
sdk
.
getMeetingService
();
meetingService
.
removeListener
(
this
);
meetingService
.
removeListener
(
this
);
}
}
...
@@ -203,12 +203,12 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -203,12 +203,12 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
ZHUMUSdk
sdk
=
ZHUMUSdk
.
getInstance
();
ZHUMUSdk
sdk
=
ZHUMUSdk
.
getInstance
();
if
(!
sdk
.
isInitialized
())
{
if
(!
sdk
.
isInitialized
())
{
Toast
.
makeText
(
this
,
"ZHUMUSDK has not been initialized successfully"
,
Toast
.
LENGTH_LONG
).
show
();
Toast
.
makeText
(
this
,
"ZHUMUSDK has not been initialized successfully"
,
Toast
.
LENGTH_LONG
).
show
();
return
;
return
;
}
}
if
(
meet_num
==
null
)
{
if
(
meet_num
==
null
)
{
Toast
.
makeText
(
this
,
"MEETING_ID in Constants can not be NULL"
,
Toast
.
LENGTH_LONG
).
show
();
Toast
.
makeText
(
this
,
"MEETING_ID in Constants can not be NULL"
,
Toast
.
LENGTH_LONG
).
show
();
return
;
return
;
}
}
...
@@ -227,8 +227,8 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -227,8 +227,8 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
}
}
private
Meeting
getMeeting
(
String
strResult
)
{
private
Meeting
getMeeting
(
String
strResult
)
{
try
{
try
{
JSONObject
jsonObject
=
new
JSONObject
(
strResult
.
toString
());
JSONObject
jsonObject
=
new
JSONObject
(
strResult
.
toString
());
int
code
=
jsonObject
.
getInt
(
"code"
);
int
code
=
jsonObject
.
getInt
(
"code"
);
int
zcode
=
jsonObject
.
getInt
(
"zcode"
);
int
zcode
=
jsonObject
.
getInt
(
"zcode"
);
...
@@ -265,7 +265,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
...
@@ -265,7 +265,7 @@ public class MainActivity extends Activity implements Constants, ZHUMUMeetingSer
meet
.
setAccounttype
(
accounttype
);
meet
.
setAccounttype
(
accounttype
);
meet
.
setToken
(
token
);
meet
.
setToken
(
token
);
return
meet
;
return
meet
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
null
;
return
null
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论