-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1017,"versionName":"2112071047","enabled":true,"outputFile":"ICSer_V1017_2112071047_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V1017_2112071047_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1018,"versionName":"2112081657","enabled":true,"outputFile":"ICSer_V1018_2112081657_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V1018_2112081657_release.apk","properties":{}}]
\ No newline at end of file
AP34,//BP34回复
AP50,//app端发起视频通话到手表
BP50,//手表端发起请求到手机
+ AP51,//获取服务器下发的通话状态
/*终端发起*/
BP00,//开机对时
BP01,//AP01返回
cmdMap.put(CMD_TYPE.BP35, "BP35");
cmdMap.put(CMD_TYPE.AP50, "AP50");
cmdMap.put(CMD_TYPE.BP50, "BP50");
+ cmdMap.put(CMD_TYPE.AP51, "AP51");
}
ICLogger.d("app端发起视频通话到手表...");
handleAP50(mRuntime, mConnection, cmd);
break;
-
+ case AP51://收到服务器的通话状态消息
+ ICLogger.d("收到服务器下发的通话状态消息");
+ handleAP51(mRuntime, mConnection, cmd);
+ break;
}
return ret;
}
+ /**
+ * 视频通话状态
+ * 0066357593061269893AP51,
+ * 3911379387,远端uid
+ * 1,状态
+ * 1633610697,时间戳
+ * 17688768961,亲情号
+ * tanmingxia0755@gmail.com;357593061269893,频道号
+ * @param mRuntime
+ * @param mConnection
+ * @param cmd
+ */
+ private void handleAP51(Runtime mRuntime, Connection mConnection, String cmd) {
+ ICLogger.d("handleAP51 ==> " + cmd);
+ String[] split = cmd.split(CMDSPLIT);
+ //服务器下发AP50,频道创建的秒为单位的时间戳,亲情号,频道ID,加入频道所需的token凭证
+ if (split.length == 6) {
+ //调用声网SDK 加入频道的uid参数 手表端暂时固定为2
+ String status = split[2];
+ String targetId = split[4];
+ ICLogger.d("status ==> " + status);
+ //TODO:回复服务器
+ ICLogger.d("send broadcast...to video call...");
+ dispatchAP51(targetId,status);
+ } else {
+ ICLogger.d("parse cmd error == > " + split.length);
+ }
+ }
+
+ private void dispatchAP51(String targetId,String status) {
+ //收到服务器时间消息的时候认为服务器已经准备好了
+ RemoteCallbackList<IFZDCallback> fzdCallback = mRuntime.getVideoCallCallback();
+ int i = fzdCallback.beginBroadcast();
+ try {
+ while (i > 0) {
+ i--;
+ //1是视频通话,0是语音通话
+ fzdCallback.getBroadcastItem(i).onRemoteReject(targetId,Integer.parseInt(status));
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ fzdCallback.finishBroadcast();
+ }
+ }
+
/**
* 处理视频通话
* 00DA357593061269893AP50,
# Location of the SDK. This is only used by Gradle.\r
# For customization when using a Version Control System, please read the\r
# header note.\r
-#Fri Oct 15 10:40:33 CST 2021\r
-sdk.dir=E\:\\Android\\Sdk
\ No newline at end of file
+#Tue Nov 23 16:39:34 CST 2021\r
+sdk.dir=D\:\\android\\Android\\sdk\r