diff --git a/IAP6Helper/src/main/java/com/samsung/utils/SamsungUtil.java b/IAP6Helper/src/main/java/com/samsung/utils/SamsungUtil.java index d47fb5a1f..a1a81f580 100644 --- a/IAP6Helper/src/main/java/com/samsung/utils/SamsungUtil.java +++ b/IAP6Helper/src/main/java/com/samsung/utils/SamsungUtil.java @@ -40,7 +40,7 @@ public class SamsungUtil { public void init() { iapHelper = IapHelper.getInstance(mContext); //设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式 - iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_TEST); + iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION); } public void dispose() { diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index d662a1d4c..7025e1357 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -830,10 +830,8 @@ 2011402032399020 959584e054a33614996361f0044e5253 - ui10vIggex2F043HnztYNuA3g - J8jvBBeJoZbVojbkWUrvsj0K0UUkuV69CqQ7CEobhJn6tvAKpQ - F8t7PgspJ8Xl2k09ccqmnmynf - aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws + JDd7XEXrOkLcx0KkkJGUbD4MQ + TSRRRFvK8bOTZ3hfRq2omp5dEXcrMUeJ0WVH0dJa5EJAGZLTrE 1527128092082286592-NfYVOcHXy630vYUj4nMlDPh8PsVBHE U5avdnRMb7yON6sYp4SAb1I99mFD8ch9KHIuFbEbd0IDN diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 7a95a9e4f..31ff8afe0 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -790,10 +790,8 @@ 2011402032399020 959584e054a33614996361f0044e5253 - ui10vIggex2F043HnztYNuA3g - J8jvBBeJoZbVojbkWUrvsj0K0UUkuV69CqQ7CEobhJn6tvAKpQ - ZWRrZnRUNlBlcHVxMXpsMzVmb2k6MTpjaQ - aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws + JDd7XEXrOkLcx0KkkJGUbD4MQ + TSRRRFvK8bOTZ3hfRq2omp5dEXcrMUeJ0WVH0dJa5EJAGZLTrE 1527128092082286592-NfYVOcHXy630vYUj4nMlDPh8PsVBHE U5avdnRMb7yON6sYp4SAb1I99mFD8ch9KHIuFbEbd0IDN diff --git a/config.gradle b/config.gradle index d7abf9627..356c8ed61 100644 --- a/config.gradle +++ b/config.gradle @@ -4,7 +4,7 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 23, targetSdkVersion : 34, - versionCode : 697, + versionCode : 698, versionName : "6.8.1" ] manifestPlaceholders = [ diff --git a/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java b/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java index 36da5c70f..b6fcc0969 100644 --- a/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java +++ b/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java @@ -5,13 +5,16 @@ import android.content.ContentResolver; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; +import android.hardware.camera2.CameraManager; import android.net.Uri; import android.text.TextUtils; import android.view.SurfaceView; import android.widget.FrameLayout; +import androidx.annotation.NonNull; import androidx.core.content.res.ResourcesCompat; +import com.blankj.utilcode.util.LogUtils; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.bean.SwTokenModel; @@ -69,6 +72,7 @@ public class SWManager extends BaseCacheManager { private ImageTrackOptions imageTrackOptions = null; private onDrPkJoinSuccessListener onDrPkJoinSuccessListener; + String openCameraId = "1"; public void setOnDrPkJoinSuccessListener(SWManager.onDrPkJoinSuccessListener onDrPkJoinSuccessListener) { this.onDrPkJoinSuccessListener = onDrPkJoinSuccessListener; @@ -253,7 +257,20 @@ public class SWManager extends BaseCacheManager { */ public void switchCamera() { if (mRtcEngine != null) { - mRtcEngine.switchCamera(); + if (openCameraId.equals("0")) { + mRtcEngine.switchCamera("1"); + openCameraId = "1"; + } else { + mRtcEngine.switchCamera("0"); + openCameraId = "0"; + } + } + } + + public void resetCamera() { + LogUtils.e("重置摄像头", openCameraId); + if (mRtcEngine != null && !TextUtils.isEmpty(openCameraId)) { + mRtcEngine.switchCamera(openCameraId); } } @@ -525,6 +542,9 @@ public class SWManager extends BaseCacheManager { }); } + public void release() { + } + public interface onRtcEngineListener { void onOpenSuccess(String channel, int uid); diff --git a/live/src/main/java/com/yunbao/live/views/LivePushSwViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushSwViewHolder.java index 6f1ba0358..add57ceb0 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushSwViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushSwViewHolder.java @@ -370,7 +370,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX } switch (temp) { case 2: - swManager.joinChannelDrEx(dr2_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid),temp); + swManager.joinChannelDrEx(dr2_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid), temp); swManager.updateMyChannelView(dr1_preview); mBigContainer.removeAllViews(); @@ -379,7 +379,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX break; case 3: drpkUid3 = uid; - swManager.joinChannelDrEx(dr4_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid),temp); + swManager.joinChannelDrEx(dr4_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid), temp); dr3_preview.setVisibility(View.GONE); dr4_preview.setVisibility(View.VISIBLE); break; @@ -387,9 +387,9 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX dr3_preview.setVisibility(View.VISIBLE); //先退出这个主播的直播间,在进入该直播间,(视图问题暂时這樣處理) swManager.exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()), drpkUid3); - swManager.joinChannelDrEx(dr3_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, drpkUid3, SWAuManager.getChannelName(drpkUid3),temp); + swManager.joinChannelDrEx(dr3_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, drpkUid3, SWAuManager.getChannelName(drpkUid3), temp); - swManager.joinChannelDrEx(dr4_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid),temp); + swManager.joinChannelDrEx(dr4_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid), temp); break; } dr_pk_view.setVisibility(View.VISIBLE); @@ -399,7 +399,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX } public void anchorClose() { - swManager.exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()),pkUid1); + swManager.exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()), pkUid1); swManager.updateMyChannelView((FrameLayout) mBigContainer); //用户主动断开连麦再退出画面 mPkContainer.setVisibility(View.GONE); pkUid1 = null; @@ -504,8 +504,9 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX public void onResume() { mPaused = false; Log.i("摄像头", "onResume: " + isNeedOpenCamera); + swManager.resetCamera(); if (isNeedOpenCamera) { - RCRTCEngine.getInstance().getDefaultVideoStream().startCamera(new IRCRTCResultDataCallback() { + /*RCRTCEngine.getInstance().getDefaultVideoStream().startCamera(new IRCRTCResultDataCallback() { @Override public void onSuccess(Boolean data) { //设置摄像头最大缩放比例 @@ -519,7 +520,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX public void onFailed(RTCErrorCode errorCode) { Log.i("摄像头", "onFailed: 打开摄像头失败 " + errorCode); } - }); + });*/ } } @@ -550,6 +551,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX super.release(); Bus.getOff(this); onDestroy(); + SWManager.get().release(); LiveHttpUtil.cancel(LiveHttpConsts.LINK_MIC_TX_MIX_STREAM); rtcRoom = null; } @@ -667,17 +669,20 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX } } - public void closeLive(){ + public void closeLive() { if (swManager != null) { swManager.exitChannelAll(); } } - public interface onDrPkJoinSuccessListener{ + public interface onDrPkJoinSuccessListener { void joinSuccess1(); + void joinSuccess2(); + void joinSuccess3(); + void joinSuccess4(); } diff --git a/main/src/main/res/mipmap-xxxhdpi/login_twitter.png b/main/src/main/res/mipmap-xxxhdpi/login_twitter.png index 19654b8ee..4ae6abcf1 100644 Binary files a/main/src/main/res/mipmap-xxxhdpi/login_twitter.png and b/main/src/main/res/mipmap-xxxhdpi/login_twitter.png differ