From 11379c0d8ef541983c63dd9b34862901182675b5 Mon Sep 17 00:00:00 2001 From: Wang Shao Cong <45502455+kirito0206@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:45:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0V4.9.1=E4=BB=A3=E7=A0=81=20(#?= =?UTF-8?q?251)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 更新v4.7.0 SampleCode * feat: 更新v4.7.0 SampleCode 删除不需要的代码 * feat: 更新v4.8.0 SampleCode * feat: 解决依赖问题 * feat: 解决依赖问题+ * feat: 解决依赖问题+ * feat: 解决依赖问题+ * feat: 解决依赖问题++ * feat: 解决依赖问题测试 * feat: 解决依赖问题测试+ * feat: 恢复代码 * feat: 替换依赖库 * feat: 替换依赖库 * feat: 删除MDatePicker依赖库 * feat: 重试 * feat: ios升级4.9.0 * feat: 触发ci * feat: meeting 4.9.0 * feat: iOS升级491 --------- Co-authored-by: wangshaocong --- SampleCode/Android/app/build.gradle | 13 ++-- .../menu/InjectMenuArrangeActivity.java | 28 +++++-- .../meeting/sampleapp/utils/CalendarUtil.java | 63 +++++++++++---- .../sampleapp/view/MeetingCommonFragment.java | 11 ++- .../view/ScheduleMeetingFragment.java | 78 +++++++++---------- .../main/res/layout/fragment_meeting_base.xml | 41 ++++++++-- SampleCode/Android/gradle.properties | 2 +- SampleCode/iOS/Podfile | 2 +- 8 files changed, 154 insertions(+), 84 deletions(-) diff --git a/SampleCode/Android/app/build.gradle b/SampleCode/Android/app/build.gradle index 99235204..6e0a0dcf 100644 --- a/SampleCode/Android/app/build.gradle +++ b/SampleCode/Android/app/build.gradle @@ -12,8 +12,8 @@ android { applicationId "com.netease.yunxin.kit.meeting.sampleapp" minSdkVersion 21 targetSdkVersion 34 - versionCode 40700 - versionName "4.7.0" + versionCode 40900 + versionName "4.9.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -50,22 +50,21 @@ dependencies { implementation fileTree(dir: "libs", include: ["*.jar","*.aar"]) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - implementation 'com.permissionx.guolindev:permissionx:1.2.2' + implementation 'com.guolindev.permissionx:permissionx:1.6.0' implementation 'androidx.preference:preference:1.1.1' implementation "androidx.activity:activity:1.2.0-beta02" implementation "androidx.fragment:fragment:1.3.0-beta02" implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' - implementation 'com.google.android:flexbox:2.0.1' + implementation 'com.google.android.flexbox:flexbox:3.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - implementation 'com.kyleduo.switchbutton:library:2.0.2' + implementation 'com.kyleduo.switchbutton:library:2.1.0' implementation "androidx.navigation:navigation-fragment-ktx:2.3.0" implementation "androidx.navigation:navigation-ui-ktx:2.3.0" - implementation 'com.manu:MDatePicker:1.0.1' - implementation("com.netease.yunxin.kit.meeting:meeting:4.7.0") + implementation("com.netease.yunxin.kit.meeting:meeting:4.9.1") compileOnly 'com.netease.yunxin:nertc-full:5.5.40' compileOnly 'com.netease.nimlib:basesdk:9.16.0' diff --git a/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/menu/InjectMenuArrangeActivity.java b/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/menu/InjectMenuArrangeActivity.java index f7187682..1933d4c1 100644 --- a/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/menu/InjectMenuArrangeActivity.java +++ b/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/menu/InjectMenuArrangeActivity.java @@ -371,24 +371,36 @@ private static String[] getMenuItemTitle(NEMeetingMenuItem item) { return new String[] {"管理参会者"}; case NEMenuIDs.SWITCH_SHOW_TYPE_MENU_ID: return new String[] {"视图布局"}; + case NEMenuIDs.NOTIFY_CENTER_MENU_ID: + return new String[] {"通知"}; case NEMenuIDs.INVITE_MENU_ID: return new String[] {"邀请"}; + case NEMenuIDs.SECURITY_MENU_ID: + return new String[] {"安全"}; case NEMenuIDs.CHAT_MENU_ID: return new String[] {"聊天"}; - case NEMenuIDs.NOTIFY_CENTER_MENU_ID: - return new String[] {"通知"}; - case NEMenuIDs.SIP_CALL_MENU_ID: - return new String[] {"呼叫"}; - case NEMenuIDs.SETTINGS_MENU_ID: - return new String[] {"设置"}; case NEMenuIDs.WHITEBOARD_MENU_ID: return new String[] {"共享白板", "退出白板"}; case NEMenuIDs.CLOUD_RECORD_MENU_ID: return new String[] {"云录制", "结束录制"}; - case NEMenuIDs.SECURITY_MENU_ID: - return new String[] {"安全"}; case NEMenuIDs.DISCONNECT_AUDIO_MENU_ID: return new String[] {"断开音频", "连接音频"}; + case NEMenuIDs.SETTINGS_MENU_ID: + return new String[] {"设置"}; + case NEMenuIDs.SIP_CALL_MENU_ID: + return new String[] {"呼叫"}; + case NEMenuIDs.CAPTIONS_MENU_ID: + return new String[] {"字幕"}; + case NEMenuIDs.TRANSCRIPTION_MENU_ID: + return new String[] {"实时转写"}; + case NEMenuIDs.INTERPRETATION_MENU_ID: + return new String[] {"同声传译"}; + case NEMenuIDs.BEAUTY_MENU_ID: + return new String[] {"美颜"}; + case NEMenuIDs.VIRTUAL_BACKGROUND_MENU_ID: + return new String[] {"虚拟背景"}; + case NEMenuIDs.LIVE_MENU_ID: + return new String[] {"直播"}; case NEMenuIDs.FEEDBACK_MENU_ID: return new String[] {"问题反馈"}; } diff --git a/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/utils/CalendarUtil.java b/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/utils/CalendarUtil.java index eda471cc..6136294e 100644 --- a/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/utils/CalendarUtil.java +++ b/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/utils/CalendarUtil.java @@ -5,13 +5,15 @@ package com.netease.yunxin.kit.meeting.sampleapp.utils; import android.app.DatePickerDialog; +import android.app.TimePickerDialog; import android.content.Context; -import android.view.Gravity; import android.widget.DatePicker; -import com.manu.mdatepicker.MDatePickerDialog; + +import java.util.Calendar; +import java.util.Date; public class CalendarUtil { - private static MDatePickerDialog dialog; + private static DatePickerDialog dialog; public static DatePickerDialog showDatePickerDialog( Context context, int mYear, int mMonth, int mDay, OnDateSetListener onDateSetListener) { @@ -30,19 +32,48 @@ public static DatePickerDialog showDatePickerDialog( return datePickerDialog; } - public static void showDatePickerDialog( - Context context, MDatePickerDialog.OnDateResultListener onDateResultListener) { - dialog = - new MDatePickerDialog.Builder(context) - //附加设置(非必须,有默认值) - .setCanceledTouchOutside(true) - .setGravity(Gravity.BOTTOM) - .setSupportTime(true) - .setTwelveHour(false) - //结果回调(必须) - .setOnDateResultListener(onDateResultListener) - .build(); - dialog.show(); + public interface OnDateResultCallback { + void onDateResult(long date); + } + + public static void showDateTimePickerDialog(Context context, long time, OnDateResultCallback listener) { + Calendar calendar = Calendar.getInstance(); + if (time != 0) { + calendar.setTime(new Date(time)); + } + int year = calendar.get(Calendar.YEAR); + int month = calendar.get(Calendar.MONTH); + int day = calendar.get(Calendar.DAY_OF_MONTH); + + dialog = + new DatePickerDialog( + context, + (view, selectedYear, monthOfYear, dayOfMonth) -> { + calendar.set(Calendar.YEAR, selectedYear); + calendar.set(Calendar.MONTH, monthOfYear); + calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth); + + int hour = calendar.get(Calendar.HOUR_OF_DAY); + int minute = calendar.get(Calendar.MINUTE); + + TimePickerDialog timePickerDialog = + new TimePickerDialog( + context, + (view1, hourOfDay, minute1) -> { + calendar.set(Calendar.HOUR_OF_DAY, hourOfDay); + calendar.set(Calendar.MINUTE, minute1); + listener.onDateResult(calendar.getTime().getTime()); + }, + hour, + minute, + true); + + timePickerDialog.show(); + }, + year, + month, + day); + dialog.show(); } public static void closeOptionsMenu() { diff --git a/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/view/MeetingCommonFragment.java b/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/view/MeetingCommonFragment.java index 082ec0a6..6ca3b3c0 100644 --- a/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/view/MeetingCommonFragment.java +++ b/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/view/MeetingCommonFragment.java @@ -90,6 +90,7 @@ void initView() { binding.etPassword.setHint("请输入密码"); binding.etPersonalTag.setHint("个人TAG"); binding.etEncryption.setHint("媒体流加密密钥"); + binding.etPluginNotifyDuration.setHint("小应用通知弹窗时间,单位ms,为0不显示通知弹窗;value<0则弹窗不自动消失"); binding.etNickname.setSingleLine(); binding.etPassword.setSingleLine(); binding.etPersonalTag.setSingleLine(); @@ -166,6 +167,7 @@ public NEMeetingOptions getMeetingOptions(NEMeetingOptions options) { options.noVideo = !settingsService.isTurnOnMyVideoWhenJoinMeetingEnabled(); options.noAudio = !settingsService.isTurnOnMyAudioWhenJoinMeetingEnabled(); options.showMeetingTime = settingsService.isShowMyMeetingElapseTimeEnabled(); + options.showNotYetJoinedMembers = settingsService.isShowNotYetJoinedMembersEnabled(); options.enableSpeakerSpotlight = settingsService.isSpeakerSpotlightEnabled(); options.enableFrontCameraMirror = settingsService.isFrontCameraMirrorEnabled(); options.enableTransparentWhiteboard = settingsService.isTransparentWhiteboardEnabled(); @@ -196,6 +198,10 @@ public NEMeetingOptions getMeetingOptions(NEMeetingOptions options) { options.noLive = binding.noLive.isChecked(); options.showMemberTag = binding.showMemberTag.isChecked(); options.showMeetingRemainingTip = binding.showMeetingRemainingTip.isChecked(); + String notifyDurationStr = binding.etPluginNotifyDuration.getText().toString(); + if (!notifyDurationStr.isEmpty()) { + options.pluginNotifyDuration = Integer.parseInt(notifyDurationStr); + } if (MeetingConfigRepository.INSTANCE.getEnableAudioOptions()) { options.audioProfile = new NEAudioProfile( @@ -226,7 +232,10 @@ public NEMeetingOptions getMeetingOptions(NEMeetingOptions options) { options.enableAudioShare = binding.enableAudioShare.isChecked(); options.showCloudRecordingUI = binding.showCloudRecordingUI.isChecked(); options.showCloudRecordMenuItem = binding.showCloudRecordMenuItem.isChecked(); - // options.enablePictureInPicture = isCheckedById(R.id.enablePictureInPicture); + options.enablePictureInPicture = binding.enablePictureInPicture.isChecked(); + options.showNotYetJoinedMembers = binding.showNotYetJoinedMembers.isChecked(); + options.enableDirectMemberMediaControlByHost = + binding.enableDirectMemberMediaControlByHost.isChecked(); return options; } diff --git a/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/view/ScheduleMeetingFragment.java b/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/view/ScheduleMeetingFragment.java index a1b551f8..e1d529c5 100644 --- a/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/view/ScheduleMeetingFragment.java +++ b/SampleCode/Android/app/src/main/java/com/netease/yunxin/kit/meeting/sampleapp/view/ScheduleMeetingFragment.java @@ -12,7 +12,6 @@ import androidx.navigation.Navigation; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import com.manu.mdatepicker.MDatePickerDialog; import com.netease.yunxin.kit.meeting.sampleapp.R; import com.netease.yunxin.kit.meeting.sampleapp.ToastCallback; import com.netease.yunxin.kit.meeting.sampleapp.adapter.ScheduleMeetingAdapter; @@ -93,48 +92,41 @@ protected void initView() { .getRecycledViewPool() .setMaxRecycledViews(ScheduleMeetingAdapter.VIEW_TYPE, 0); mAdapter.setOnItemClickListener( - (view, position) -> { - ScheduleMeetingItem item = dataList.get(position); - switch (item.getClickAction()) { - case ScheduleMeetingItem.SET_START_TIME_ACTION: - CalendarUtil.showDatePickerDialog( - getActivity(), - new MDatePickerDialog.OnDateResultListener() { - - @Override - public void onDateResult(long date) { - startTime = date; - mAdapter - .getData() - .get(ScheduleMeetingItem.SET_START_TIME_ACTION) - .setTimeTip(formatTime(date)); - mAdapter.updateData( - ScheduleMeetingItem.SET_START_TIME_ACTION, - mAdapter.getData().get(ScheduleMeetingItem.SET_START_TIME_ACTION)); - } - }); - break; - case ScheduleMeetingItem.SET_END_TIME_ACTION: - CalendarUtil.showDatePickerDialog( - getActivity(), - new MDatePickerDialog.OnDateResultListener() { - - @Override - public void onDateResult(long date) { - //TODO 必须大于当前开始时间 - endTime = date; - mAdapter - .getData() - .get(ScheduleMeetingItem.SET_END_TIME_ACTION) - .setTimeTip(formatTime(date)); - mAdapter.updateData( - ScheduleMeetingItem.SET_END_TIME_ACTION, - mAdapter.getData().get(ScheduleMeetingItem.SET_END_TIME_ACTION)); - } - }); - break; - } - }); + (view, position) -> { + ScheduleMeetingItem item = dataList.get(position); + switch (item.getClickAction()) { + case ScheduleMeetingItem.SET_START_TIME_ACTION: + CalendarUtil.showDateTimePickerDialog( + getActivity(), + startTime, + date -> { + startTime = date; + mAdapter + .getData() + .get(ScheduleMeetingItem.SET_START_TIME_ACTION) + .setTimeTip(formatTime(date)); + mAdapter.updateData( + ScheduleMeetingItem.SET_START_TIME_ACTION, + mAdapter.getData().get(ScheduleMeetingItem.SET_START_TIME_ACTION)); + }); + break; + case ScheduleMeetingItem.SET_END_TIME_ACTION: + CalendarUtil.showDateTimePickerDialog( + getActivity(), + endTime, + date -> { + endTime = date; + mAdapter + .getData() + .get(ScheduleMeetingItem.SET_END_TIME_ACTION) + .setTimeTip(formatTime(date)); + mAdapter.updateData( + ScheduleMeetingItem.SET_END_TIME_ACTION, + mAdapter.getData().get(ScheduleMeetingItem.SET_END_TIME_ACTION)); + }); + break; + } + }); mAdapter.setOnCheckedChangeListener( (compoundButton, enable, clickAction) -> { if (compoundButton != null && compoundButton.getId() == R.id.sb_meeting_switch) { diff --git a/SampleCode/Android/app/src/main/res/layout/fragment_meeting_base.xml b/SampleCode/Android/app/src/main/res/layout/fragment_meeting_base.xml index c5b8e550..fadc7f37 100644 --- a/SampleCode/Android/app/src/main/res/layout/fragment_meeting_base.xml +++ b/SampleCode/Android/app/src/main/res/layout/fragment_meeting_base.xml @@ -308,12 +308,27 @@ android:layout_height="wrap_content" android:checked="false" android:text="音频共享" /> - - - - - - + + + + + + + app:constraint_referenced_ids="cloudRecord,showCloudRecordingUI,showCloudRecordMenuItem,noSip,noWhiteBoard,defaultWhiteBoard,showMemberTag,showMeetingRemainingTip,audioOffNotAllowSelfOn,audioOffAllowSelfOn,videoOffAllowSelfOn,videoOffNotAllowSelfOn,noMuteAllVideo,noMuteAllAudio,detectMutedMic,unpubAudioOnMute,showScreenShareUserVideo,showWhiteboardShareUserVideo,showFloatingMicrophone,enableAudioShare,enablePictureInPicture,showNotYetJoinedMembers,enableDirectMemberMediaControlByHost" /> @@ -471,6 +486,18 @@ app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@id/checkbox_flow_1" + app:layout_constraintBottom_toTopOf="@id/et_plugin_notify_duration" + /> + + diff --git a/SampleCode/Android/gradle.properties b/SampleCode/Android/gradle.properties index afa06e32..f929a6c6 100644 --- a/SampleCode/Android/gradle.properties +++ b/SampleCode/Android/gradle.properties @@ -38,7 +38,7 @@ kotlin.code.style=official # eg. major.minor.hotfix{.buildNum} # eg. 1.0.0.0 # eg. 1.0.0 -VERSION_NAME=4.5.1 +VERSION_NAME=4.8.0 #versionSuffix=SNAPSHOT #generateJavaDoc=false diff --git a/SampleCode/iOS/Podfile b/SampleCode/iOS/Podfile index 486e8d57..57c4aa43 100644 --- a/SampleCode/iOS/Podfile +++ b/SampleCode/iOS/Podfile @@ -12,7 +12,7 @@ target 'NEMeetingDemo' do pod 'Masonry', '~> 1.1.0' pod 'Reachability' - pod 'NEMeetingKit', '~> 4.8.0' + pod 'NEMeetingKit', '~> 4.9.1' end post_install do |installer|