【发布时间】:2020-08-23 09:13:38
【问题描述】:
我正在尝试将 Zoom SDK 会议集成到 Android 应用中。我一直在努力使用自定义会议 ui 并学习如何使用 Zoom 的视频视图 MobileRTCVideoView。这是我要创建的界面:
我尝试过的:
- 在Github 上学习了 Zoom 的示例应用程序。
- 学习了 Zoom 的 documentation 来定制会议用户界面。
- Asked 在开发者论坛上。
- 在开发者论坛上阅读related threads。
然而,我仍然不明白如何实现它,非常感谢一些关于如何使用MobileRTCVideoView的解释,并实现图像所示的会议ui。会议一次最多只能容纳两个用户。
我使用 API Key 和 Secret 初始化 Zoom SDK,并使用电子邮件登录。我启用了自定义会议用户界面:
zoomSDK!!.meetingSettingsHelper.isCustomizedMeetingUIEnabled=true
我开始即时会议:
val meetingService=zoomSDK!!.meetingService
val opts=InstantMeetingOptions()
opts.no_driving_mode = true
opts.no_invite = false
opts.no_meeting_end_message = false
opts.no_titlebar = false
opts.no_bottom_toolbar = false
opts.no_dial_in_via_phone = true
opts.no_dial_out_to_phone = true
opts.no_disconnect_audio = true
meetingService.startInstantMeeting(this,opts)
我尝试通过为自定义会议创建另一个活动来遵循示例应用程序,但显然课程和代码不完整:
class CustomMeetingActivity: FragmentActivity() {
private var zoomSDK:ZoomSDK?=null
private var inflater:LayoutInflater?=null
private var normal_view:View?=null
private var video_view:MobileRTCVideoView?=null
private var video_manager:MobileRTCVideoViewManager?=null
private var meeting_service:MeetingService?=null
private var in_meeting_service:InMeetingService?=null
private var share_view:MobileRTCShareView?=null
private var meeting_video_view:FrameLayout?=null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
zoomSDK=ZoomSDK.getInstance()
meeting_service = ZoomSDK.getInstance().meetingService
in_meeting_service=ZoomSDK.getInstance().inMeetingService
if(meeting_service==null || in_meeting_service==null){finish();return}
setContentView(R.layout.custom_meeting_layout)
inflater=layoutInflater;
normal_view = inflater!!.inflate(R.layout.meeting_content_normal,null)
meeting_video_view = findViewById<View>(R.id.meetingVideoView) as FrameLayout
share_view = findViewById<View>(R.id.sharingView) as MobileRTCShareView
video_view=normal_view!!.findViewById(R.id.videoView) as MobileRTCVideoView
}
}
在清单中添加了活动:
<activity
android:name="com.mypackage.appname.CustomMeetingActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/ZMTheme.SubWindow">
</activity>
【问题讨论】:
-
嘿,我陷入了同样的境地。我已经阅读了你在开发者论坛上关于 zoom 的帖子,你得到了这个问题的解决方案,所以你能提供你的示例项目的 github 链接或 zoom sdk 链接,因为现在从 github 中删除了定制的 UI 项目。
标签: android user-interface kotlin sdk zoom-sdk