Commit 06343380 authored by mrding's avatar mrding
Browse files

临时提交

parent 4498b20b
......@@ -23,20 +23,20 @@ android {
}
}
/*signingConfigs {
signingConfigs {
release {
storeFile file("./citicsf_csp_pad.jks")
storePassword "wckh@2025"
keyAlias "key0"
keyPassword "wckh@2025"
}
}*/
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.release
signingConfig signingConfigs.release
}
}
......@@ -49,8 +49,8 @@ android {
sit {
applicationId "com.citicsf.csp.pad.sit"
versionCode 210
versionName "2.1.0"
versionCode 220
versionName "2.2.0"
minSdkVersion 24
targetSdkVersion 28
manifestPlaceholders = [app_name: "外出开户SIT", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"]
......@@ -62,8 +62,8 @@ android {
uat {
applicationId "com.citicsf.csp.pad.uat"
versionCode 210
versionName "2.1.0"
versionCode 220
versionName "2.2.0"
minSdkVersion 24
targetSdkVersion 28
manifestPlaceholders = [app_name: "外出开户UAT", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"]
......@@ -75,8 +75,8 @@ android {
sim {
applicationId "com.citicsf.csp.pad.sim"
versionCode 210
versionName "2.1.0"
versionCode 220
versionName "2.2.0"
minSdkVersion 24
targetSdkVersion 28
manifestPlaceholders = [app_name: "外出开户SIM", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"]
......@@ -89,8 +89,8 @@ android {
//正式环境
formal {
applicationId "com.citicsf.csp.pad.formal"
versionCode 210
versionName "2.1.0"
versionCode 220
versionName "2.2.0"
minSdkVersion 24
targetSdkVersion 28
manifestPlaceholders = [app_name: "外出开户", icon: "@mipmap/ic_launcher_zxqh", bdkey: "ixVXFlhEFLSAXtA2IVeNF0CNw2chONRQ", screenOrientation: "landscape"]
......
......@@ -1268,9 +1268,10 @@ public class HttpRequester {
SessionManager sessionManager = SessionManager.getInstance();
//创建请求头
Map<String, String> header=createFileServiceHeader(raw);
if(headers != null){
Map<String, String> header = createFileServiceHeader(raw);
if (headers != null) {
header.putAll(headers);
header.put("Content-Type", "application/json");
}
if(!raw) {
......@@ -1307,27 +1308,28 @@ public class HttpRequester {
}else {
// 创建下载连接
client = createHttpURLClient(url, POST, header, timeout);
Log.d("okHttp",client.toString());
// Log.d("okHttp",client.toString());
// 内容字节数组
byte[] bytes = new byte[0];
// 字节数组长度
int byteSize = 0;
// 拼装内容
if (data != null) {
StringBuilder sb = new StringBuilder();
Map<String, String> map = (Map<String, String>) data;
for (String key : map.keySet()) {
String value = map.get(key);
sb.append(key);
sb.append("=");
sb.append(URLEncoder.encode(value, encoding));
sb.append("&");
}
String content = "";
int len = sb.length();
if (len > 0) {
content = sb.substring(0, len - 1);
}
// StringBuilder sb = new StringBuilder();
// Map<String, String> map = (Map<String, String>) data;
// for (String key : map.keySet()) {
// String value = map.get(key);
// sb.append(key);
// sb.append("=");
// sb.append(URLEncoder.encode(value, encoding));
// sb.append("&");
// }
// String content = "";
// int len = sb.length();
// if (len > 0) {
// content = sb.substring(0, len - 1);
// }
String content = new JSONObject(data).toString();
bytes = content.getBytes(encoding);
byteSize = bytes.length;
}
......
......@@ -3,17 +3,20 @@
<!--启动扩展-->
<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 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 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 point="fox.extension.native">
......@@ -27,5 +30,9 @@
<native action="recordStopRemote" 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>
</plugins>
\ No newline at end of file
......@@ -6,12 +6,28 @@ import android.text.TextUtils;
import com.citicsf.lib.ykf.callback.YKFException;
import com.citicsf.lib.ykf_agent.YKFAgent;
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.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.JSONObject;
import java.util.List;
import fox.core.Cite;
import fox.core.ICallback;
import fox.core.plugins.natives.INative;
......@@ -20,6 +36,8 @@ import fox.ninetales.FXPlatform;
public class RecordNative implements INative {
private FileInputCallback fileInputCallback;
/**
* 调用
*
......@@ -70,12 +88,12 @@ public class RecordNative implements INative {
jsonObject = JsonHelper.parser(param);
String mediaType = jsonObject.optString("mediaType");
int mediaTypeInt = 0;
if(!TextUtils.isEmpty(mediaType)){
if (mediaType.equals("1")){
if (!TextUtils.isEmpty(mediaType)) {
if (mediaType.equals("1")) {
mediaTypeInt = 1;
}
}
YKFAgent.getInstance().recordJoinRoom(context,mediaTypeInt,
YKFAgent.getInstance().recordJoinRoom(context, mediaTypeInt,
new com.citicsf.lib.ykf.callback.ICallback<Integer>() {
@Override
public void onError(YKFException e) {
......@@ -91,7 +109,7 @@ public class RecordNative implements INative {
case "recordStartRemote":
jsonObject = JsonHelper.parser(param);
String fileName = jsonObject.optString("fileName","");
String fileName = jsonObject.optString("fileName", "");
String extraInfo = jsonObject.getString("extraInfo");
YKFAgent.getInstance().recordStartRemote(fileName, extraInfo);
callbackContext.callback(ICallback.SUCCESS, 0);
......@@ -107,6 +125,35 @@ public class RecordNative implements INative {
callbackContext.callback(ICallback.SUCCESS, 0);
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:
callbackContext.callback(ICallback.ERROR, "未找到对应方法");
break;
......@@ -115,4 +162,251 @@ public class RecordNative implements INative {
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