diff --git a/app/aliyun-libs/SudMGP-v1.1.31.181.aar b/app/aliyun-libs/SudMGP-v1.1.31.181.aar deleted file mode 100644 index 1e5879f7d..000000000 Binary files a/app/aliyun-libs/SudMGP-v1.1.31.181.aar and /dev/null differ diff --git a/app/aliyun-libs/SudMGP-v1.1.32.200.aar b/app/aliyun-libs/SudMGP-v1.1.32.200.aar new file mode 100644 index 000000000..f781d255d Binary files /dev/null and b/app/aliyun-libs/SudMGP-v1.1.32.200.aar differ diff --git a/app/build.gradle b/app/build.gradle index 434ab76bf..533a2d768 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -294,7 +294,7 @@ dependencies { implementation files('libs/humesdk-1.0.0.aar') - implementation(name: 'SudMGP-v1.1.31.181', ext: 'aar') + implementation(name: 'SudMGP-v1.1.32.200', ext: 'aar') // xplan flutter module if (useFlutterAar) { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 82549c31d..1f7a69167 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -80,7 +80,7 @@ { - updateMyMicQueue(STATUS_NOT_READY, true) + + try { + val jsonObject = JSONObject(dataJson) + val seatIndex = jsonObject.getInt("seatIndex") + updateMyMicQueue(STATUS_NOT_READY, true, seatIndex) + } catch (e: Exception) { + e.printStackTrace() + } + } SudMGPMGState.APP_COMMON_SELF_CLICK_START_BTN -> { notifySelfPlayingState(true) @@ -436,11 +449,11 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId: } } - private fun updateMyMicQueue(gameStatus: Int, isJoin: Boolean = false) { + private fun updateMyMicQueue(gameStatus: Int, isJoin: Boolean = false, seatIndex: Int = -1) { UserModel.get().cacheLoginUserInfo?.gameStatus = gameStatus val position = AvRoomDataManager.get().getMicPosition(mUid) if (position != AvRoomDataManager.POSITON_NOT_ON_MIC) { - if (isJoin) notifySelfInState(true) + if (isJoin) notifySelfInState(true, seatIndex) homePartyModel.updateMyMicQueue( position, AvRoomDataManager.get().roomId.toString(), @@ -457,7 +470,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId: AvRoomDataManager.get().roomId.toString(), false, object : CallBack { override fun onSuccess(data: String?) { - notifySelfInState(true) + notifySelfInState(true, seatIndex) } override fun onFail(code: Int, error: String?) { @@ -552,7 +565,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId: } } - fun notifySelfInState(isIn: Boolean) { + fun notifySelfInState(isIn: Boolean, seatIndex: Int = -1) { try { if (!isIn) { notifySelfReadyState(false) @@ -562,6 +575,9 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId: //状态数据 val jsonObject = JSONObject() jsonObject.put("isIn", isIn) // true 加入游戏,false 退出游戏 + if (seatIndex != -1) { + jsonObject.put("seatIndex", seatIndex) + } jsonObject.put("teamId", 1) //哪一队伍(2v2,4v4) val dataJson = jsonObject.toString()