Commit 06343380 authored by mrding's avatar mrding
Browse files

临时提交

parent 4498b20b
...@@ -23,20 +23,20 @@ android { ...@@ -23,20 +23,20 @@ android {
} }
} }
/*signingConfigs { signingConfigs {
release { release {
storeFile file("./citicsf_csp_pad.jks") storeFile file("./citicsf_csp_pad.jks")
storePassword "wckh@2025" storePassword "wckh@2025"
keyAlias "key0" keyAlias "key0"
keyPassword "wckh@2025" keyPassword "wckh@2025"
} }
}*/ }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
} }
...@@ -49,8 +49,8 @@ android { ...@@ -49,8 +49,8 @@ android {
sit { sit {
applicationId "com.citicsf.csp.pad.sit" applicationId "com.citicsf.csp.pad.sit"
versionCode 210 versionCode 220
versionName "2.1.0" versionName "2.2.0"
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 28 targetSdkVersion 28
manifestPlaceholders = [app_name: "外出开户SIT", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"] manifestPlaceholders = [app_name: "外出开户SIT", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"]
...@@ -62,8 +62,8 @@ android { ...@@ -62,8 +62,8 @@ android {
uat { uat {
applicationId "com.citicsf.csp.pad.uat" applicationId "com.citicsf.csp.pad.uat"
versionCode 210 versionCode 220
versionName "2.1.0" versionName "2.2.0"
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 28 targetSdkVersion 28
manifestPlaceholders = [app_name: "外出开户UAT", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"] manifestPlaceholders = [app_name: "外出开户UAT", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"]
...@@ -75,8 +75,8 @@ android { ...@@ -75,8 +75,8 @@ android {
sim { sim {
applicationId "com.citicsf.csp.pad.sim" applicationId "com.citicsf.csp.pad.sim"
versionCode 210 versionCode 220
versionName "2.1.0" versionName "2.2.0"
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 28 targetSdkVersion 28
manifestPlaceholders = [app_name: "外出开户SIM", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"] manifestPlaceholders = [app_name: "外出开户SIM", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"]
...@@ -89,8 +89,8 @@ android { ...@@ -89,8 +89,8 @@ android {
//正式环境 //正式环境
formal { formal {
applicationId "com.citicsf.csp.pad.formal" applicationId "com.citicsf.csp.pad.formal"
versionCode 210 versionCode 220
versionName "2.1.0" versionName "2.2.0"
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 28 targetSdkVersion 28
manifestPlaceholders = [app_name: "外出开户", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"] manifestPlaceholders = [app_name: "外出开户", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"]
......
...@@ -1268,9 +1268,10 @@ public class HttpRequester { ...@@ -1268,9 +1268,10 @@ public class HttpRequester {
SessionManager sessionManager = SessionManager.getInstance(); SessionManager sessionManager = SessionManager.getInstance();
//创建请求头 //创建请求头
Map<String, String> header=createFileServiceHeader(raw); Map<String, String> header = createFileServiceHeader(raw);
if(headers != null){ if (headers != null) {
header.putAll(headers); header.putAll(headers);
header.put("Content-Type", "application/json");
} }
if(!raw) { if(!raw) {
...@@ -1307,27 +1308,28 @@ public class HttpRequester { ...@@ -1307,27 +1308,28 @@ public class HttpRequester {
}else { }else {
// 创建下载连接 // 创建下载连接
client = createHttpURLClient(url, POST, header, timeout); client = createHttpURLClient(url, POST, header, timeout);
Log.d("okHttp",client.toString()); // Log.d("okHttp",client.toString());
// 内容字节数组 // 内容字节数组
byte[] bytes = new byte[0]; byte[] bytes = new byte[0];
// 字节数组长度 // 字节数组长度
int byteSize = 0; int byteSize = 0;
// 拼装内容 // 拼装内容
if (data != null) { if (data != null) {
StringBuilder sb = new StringBuilder(); // StringBuilder sb = new StringBuilder();
Map<String, String> map = (Map<String, String>) data; // Map<String, String> map = (Map<String, String>) data;
for (String key : map.keySet()) { // for (String key : map.keySet()) {
String value = map.get(key); // String value = map.get(key);
sb.append(key); // sb.append(key);
sb.append("="); // sb.append("=");
sb.append(URLEncoder.encode(value, encoding)); // sb.append(URLEncoder.encode(value, encoding));
sb.append("&"); // sb.append("&");
} // }
String content = ""; // String content = "";
int len = sb.length(); // int len = sb.length();
if (len > 0) { // if (len > 0) {
content = sb.substring(0, len - 1); // content = sb.substring(0, len - 1);
} // }
String content = new JSONObject(data).toString();
bytes = content.getBytes(encoding); bytes = content.getBytes(encoding);
byteSize = bytes.length; byteSize = bytes.length;
} }
......
...@@ -3,17 +3,20 @@ ...@@ -3,17 +3,20 @@
<!--启动扩展--> <!--启动扩展-->
<extension point="fox.extension.boot"> <extension point="fox.extension.boot">
<!--远程录制--> <!--远程录制-->
<boot name="record" class="fox.market.zxqh.plugin.record.RecordBoot" priority="10" text="远程录制" /> <boot name="record" class="fox.market.zxqh.plugin.record.RecordBoot" priority="10"
text="远程录制" />
</extension> </extension>
<extension point="fox.extension.plugin"> <extension point="fox.extension.plugin">
<!--重写插件--> <!--重写插件-->
<plugin name="consolePlugin" class="fox.market.zxqh.plugin.override.OverridePlugin" onload="true" text="重写插件" /> <plugin name="consolePlugin" class="fox.market.zxqh.plugin.override.OverridePlugin"
onload="true" text="重写插件" />
</extension> </extension>
<extension point="fox.extension.device"> <extension point="fox.extension.device">
<!--身份证读卡器--> <!--身份证读卡器-->
<device class="fox.market.zxqh.plugin.idcard.IDCardDevice" devId="zxqh-idcard-default" devName="身份证读卡器" scope="singleton" type="zxqh-idcard" typeName="身份证读卡器" /> <device class="fox.market.zxqh.plugin.idcard.IDCardDevice" devId="zxqh-idcard-default"
devName="身份证读卡器" scope="singleton" type="zxqh-idcard" typeName="身份证读卡器" />
</extension> </extension>
<extension point="fox.extension.native"> <extension point="fox.extension.native">
...@@ -27,5 +30,9 @@ ...@@ -27,5 +30,9 @@
<native action="recordStopRemote" class="fox.market.zxqh.plugin.record.RecordNative" /> <native action="recordStopRemote" class="fox.market.zxqh.plugin.record.RecordNative" />
<!--远程录制_离开录制--> <!--远程录制_离开录制-->
<native action="recordLeaveRoom" class="fox.market.zxqh.plugin.record.RecordNative" /> <native action="recordLeaveRoom" class="fox.market.zxqh.plugin.record.RecordNative" />
<!--远程录制_本地录音-->
<native action="recordAudioInput" class="fox.market.zxqh.plugin.record.RecordNative" />
<!--远程录制_本地录音_暂停播放-->
<native action="recordAudioInputCtrl" class="fox.market.zxqh.plugin.record.RecordNative" />
</extension> </extension>
</plugins> </plugins>
\ No newline at end of file
...@@ -6,12 +6,28 @@ import android.text.TextUtils; ...@@ -6,12 +6,28 @@ import android.text.TextUtils;
import com.citicsf.lib.ykf.callback.YKFException; import com.citicsf.lib.ykf.callback.YKFException;
import com.citicsf.lib.ykf_agent.YKFAgent; import com.citicsf.lib.ykf_agent.YKFAgent;
import com.citicsf.lib.ykf_agent.YKFAgentParams; import com.citicsf.lib.ykf_agent.YKFAgentParams;
import com.citicsf.lib.ykf_agent.business.YKFRoomListenerStub;
import com.citicsf.lib.ykf_agent.business.chatvideo.AgentVideoParams; import com.citicsf.lib.ykf_agent.business.chatvideo.AgentVideoParams;
import com.citicsf.lib.ykf_agent.http.AgentHttp; import com.citicsf.lib.ykf_agent.http.AgentHttp;
import com.juphoon.cc.plugin.JCCRoomManager;
import com.juphoon.rtc.JRTCCallCenterGroupItem;
import com.juphoon.rtc.JRTCClient;
import com.juphoon.rtc.JRTCInviter;
import com.juphoon.rtc.JRTCMediaDeviceVideoCanvas;
import com.juphoon.rtc.JRTCNotifyMessage;
import com.juphoon.rtc.JRTCRoom;
import com.juphoon.rtc.JRTCRoomParticipant;
import com.juphoon.rtc.JRTCRoomQueryInfo;
import com.juphoon.rtc.JRTCSDKEvent;
import com.juphoon.rtc.JRTCUploadFileInfo;
import com.juphoon.rtc.kit.IJRTCAgentCallback;
import com.juphoon.rtc.kit.IJRTCRoomCallback;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.util.List;
import fox.core.Cite; import fox.core.Cite;
import fox.core.ICallback; import fox.core.ICallback;
import fox.core.plugins.natives.INative; import fox.core.plugins.natives.INative;
...@@ -20,6 +36,8 @@ import fox.ninetales.FXPlatform; ...@@ -20,6 +36,8 @@ import fox.ninetales.FXPlatform;
public class RecordNative implements INative { public class RecordNative implements INative {
private FileInputCallback fileInputCallback;
/** /**
* 调用 * 调用
* *
...@@ -70,12 +88,12 @@ public class RecordNative implements INative { ...@@ -70,12 +88,12 @@ public class RecordNative implements INative {
jsonObject = JsonHelper.parser(param); jsonObject = JsonHelper.parser(param);
String mediaType = jsonObject.optString("mediaType"); String mediaType = jsonObject.optString("mediaType");
int mediaTypeInt = 0; int mediaTypeInt = 0;
if(!TextUtils.isEmpty(mediaType)){ if (!TextUtils.isEmpty(mediaType)) {
if (mediaType.equals("1")){ if (mediaType.equals("1")) {
mediaTypeInt = 1; mediaTypeInt = 1;
} }
} }
YKFAgent.getInstance().recordJoinRoom(context,mediaTypeInt, YKFAgent.getInstance().recordJoinRoom(context, mediaTypeInt,
new com.citicsf.lib.ykf.callback.ICallback<Integer>() { new com.citicsf.lib.ykf.callback.ICallback<Integer>() {
@Override @Override
public void onError(YKFException e) { public void onError(YKFException e) {
...@@ -91,7 +109,7 @@ public class RecordNative implements INative { ...@@ -91,7 +109,7 @@ public class RecordNative implements INative {
case "recordStartRemote": case "recordStartRemote":
jsonObject = JsonHelper.parser(param); jsonObject = JsonHelper.parser(param);
String fileName = jsonObject.optString("fileName",""); String fileName = jsonObject.optString("fileName", "");
String extraInfo = jsonObject.getString("extraInfo"); String extraInfo = jsonObject.getString("extraInfo");
YKFAgent.getInstance().recordStartRemote(fileName, extraInfo); YKFAgent.getInstance().recordStartRemote(fileName, extraInfo);
callbackContext.callback(ICallback.SUCCESS, 0); callbackContext.callback(ICallback.SUCCESS, 0);
...@@ -107,6 +125,35 @@ public class RecordNative implements INative { ...@@ -107,6 +125,35 @@ public class RecordNative implements INative {
callbackContext.callback(ICallback.SUCCESS, 0); callbackContext.callback(ICallback.SUCCESS, 0);
break; break;
case "recordAudioInput":
if (fileInputCallback != null) {
JCCRoomManager.getInstance().getEngine().removeCallBack(fileInputCallback);
fileInputCallback = null;
}
fileInputCallback = new FileInputCallback() {
@Override
public void onFileAudioInputDidFinish() {
callbackContext.callback(ICallback.SUCCESS, 0);
JCCRoomManager.getInstance().getEngine().removeCallBack(fileInputCallback);
fileInputCallback = null;
}
};
jsonObject = JsonHelper.parser(param);
boolean enable = jsonObject.getBoolean("enable");
String path = jsonObject.getString("path");
JCCRoomManager.getInstance().getEngine().addCallBack(fileInputCallback);
JCCRoomManager.getInstance().getEngine().getMediaDevice().enableAudioInputFromFile(enable, path, false);
break;
case "recordAudioInputCtrl":
jsonObject = JsonHelper.parser(param);
boolean pause = jsonObject.getBoolean("pause");
JCCRoomManager.getInstance().getEngine().getMediaDevice().suspendAudioInputFromFile(pause);
callbackContext.callback(ICallback.SUCCESS, 0);
break;
default: default:
callbackContext.callback(ICallback.ERROR, "未找到对应方法"); callbackContext.callback(ICallback.ERROR, "未找到对应方法");
break; break;
...@@ -115,4 +162,251 @@ public class RecordNative implements INative { ...@@ -115,4 +162,251 @@ public class RecordNative implements INative {
callbackContext.callback(ICallback.ERROR, e.getMessage()); callbackContext.callback(ICallback.ERROR, e.getMessage());
} }
} }
static class FileInputCallback implements IJRTCRoomCallback {
@Override
public void onRoomStateChanged(int state, int oldState, JRTCRoom room) {
}
@Override
public void onRoomPropertyChanged(JRTCRoom.PropChangeParam changeParam, JRTCRoom room) {
}
@Override
public void onJoin(boolean result, int reason, String roomId, JRTCRoom room) {
}
@Override
public void onLeave(int reason, String roomId, JRTCRoom room) {
}
@Override
public void onQuery(int operationId, boolean result, int reason, JRTCRoomQueryInfo queryInfo, JRTCRoom room) {
}
@Override
public void onParticipantJoin(JRTCRoomParticipant participant, JRTCRoom room) {
}
@Override
public void onParticipantLeft(JRTCRoomParticipant participant, int reason, JRTCRoom room) {
}
@Override
public void onParticipantUpdate(JRTCRoomParticipant participant, JRTCRoomParticipant.ChangeParam changeParam, JRTCRoom room) {
}
@Override
public void onMessageReceived(String type, String content, String fromUserId, JRTCRoom room) {
}
@Override
public void onInviteSipUserResult(int operationId, boolean result, int reason, JRTCRoom room) {
}
@Override
public void onDeliveryAbort(boolean isShutDown, String deliveryUserId, String reason, JRTCRoom room) {
}
@Override
public void onFileAudioInputFinish(JRTCRoom room) {
}
@Override
public void onEnableRemoteAdvancedRecordResult(JRTCRoom room, boolean result, String error) {
}
@Override
public void onLogin(boolean result, int reason) {
}
@Override
public void onLogout(int reason) {
}
@Override
public void onClientStateChanged(int state, int oldState) {
}
@Override
public void onOnlineMessageSendResult(boolean result, int operatorId) {
}
@Override
public void onOnlineMessageReceived(String message, String userId) {
}
@Override
public void onSDKEvent(JRTCSDKEvent event) {
}
@Override
public void onP2PSessionCreate(JRTCClient.JRTCP2PSession session, boolean result) {
}
@Override
public void onP2PSessionConnect(JRTCClient.JRTCP2PSession session, boolean result) {
}
@Override
public void onP2PSessionClose(JRTCClient.JRTCP2PSession session) {
}
@Override
public void onP2PMessageReceived(JRTCClient.JRTCP2PSession session, String receiveMsg) {
}
@Override
public void onGetUploadUrlResponse(boolean result, String token, String url, String fileId, long offset) {
}
@Override
public void onRequestFileUploadInfoResponse(int operatorId, boolean result, String url, String token, long requestTimestamp, String extraInfo, long fileSize, int offset, String fileType, String serverOid, String reason) {
}
@Override
public void onCompleteFileUploadResponse(int operatorId, boolean result, String fileName, String extraInfo, String fileType, String reason) {
}
@Override
public void onGetUploadFileInfoResponse(int operatorId, boolean result, List<JRTCUploadFileInfo> uploadFileInfoList, String extraInfo, String reason) {
}
@Override
public void onFileUploadPlatformNotify(boolean result, String serialId, JRTCUploadFileInfo uploadFileInfo) {
}
@Override
public void onQualityCheckResult(int operatorId, String content) {
}
@Override
public void onAudioError(String error) {
}
@Override
public void onAudioRouteTypeChanged(int audioRouteType) {
}
@Override
public void onCameraUpdate() {
}
@Override
public void onVideoCaptureDidStart(String streamId, double ratio) {
}
@Override
public void onRenderReceived(JRTCMediaDeviceVideoCanvas canvas, double ratio) {
}
@Override
public void onRenderResized(JRTCMediaDeviceVideoCanvas canvas, double ratio) {
}
@Override
public void onRenderStart(JRTCMediaDeviceVideoCanvas canvas, double ratio) {
}
@Override
public void onScreenSharePermissionResult(boolean result) {
}
@Override
public void onSnapshotComplete(String file, int width, int height) {
}
/**
* @param errorDetail
* @deprecated
*/
@Override
public void onVideoError(String errorDetail) {
}
@Override
public void onVideoError(int errorType, String errorDetail) {
}
@Override
public void onMemoryAvailable(double memorySize) {
}
@Override
public void onRingPlayFinish() {
}
@Override
public void onFileAudioInputDidFinish() {
}
@Override
public void onTessarEvent(int eventCode, String extraInfo) {
}
@Override
public void onVideoCaptureRecordEnd(String filePath, long duration) {
}
@Override
public void onVideoCaptureRecordFileSlice(String filePath, boolean isLast) {
}
@Override
public void onVideoCaptureRecordError(String error) {
}
@Override
public void onSystemPhoneStateChanged(int newState, int oldState) {
}
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment