Commit bc84c3d7 by Kang Donghun

Merge branch 'features/abcomm_sp6_start_voice_from_name_card' into 'features/abcomm_sp6'

[ネームカード]の[音声通話]を押下すると、該当ユーザと[音声通話]を開始する

See merge request !140
parents 18b8c3c0 ff881d25
...@@ -907,7 +907,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -907,7 +907,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
} }
@JavascriptInterface @JavascriptInterface
public void createChatRoom(String roomType, String userIdList, String encodedRoomName, String screenFlg) throws NetworkDisconnectedException, AcmsException { public void createChatRoom(String roomType, String userIdList, String encodedRoomName, String screenFlg, boolean isVoice) throws NetworkDisconnectedException, AcmsException {
CreatedRoomJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).createRoom(sid, roomType, userIdList, encodedRoomName, loginId); CreatedRoomJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).createRoom(sid, roomType, userIdList, encodedRoomName, loginId);
if (ABookCommConstants.FLAG.SCREEN_FLG.MAKE_ROOM.equals(Integer.parseInt(screenFlg))) { if (ABookCommConstants.FLAG.SCREEN_FLG.MAKE_ROOM.equals(Integer.parseInt(screenFlg))) {
final ChatRoomDto chatRoomDto = communicationLogic.getChatRoom(resultJson.chatRoomDto.chatRoomId); final ChatRoomDto chatRoomDto = communicationLogic.getChatRoom(resultJson.chatRoomDto.chatRoomId);
...@@ -925,12 +925,23 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -925,12 +925,23 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
communicationLogic.addUserInRoom(StringUtil.join(",", userIdList, shopMemberId.toString()), resultJson.chatRoomDto.chatRoomId); communicationLogic.addUserInRoom(StringUtil.join(",", userIdList, shopMemberId.toString()), resultJson.chatRoomDto.chatRoomId);
final Integer chatRoomId = resultJson.chatRoomDto.chatRoomId; final Integer chatRoomId = resultJson.chatRoomDto.chatRoomId;
final String chatRoomName = resultJson.chatRoomDto.chatRoomName; final String chatRoomName = resultJson.chatRoomDto.chatRoomName;
mChatWebView.post(new Runnable() { if (isVoice) {
@Override roomId = chatRoomId.longValue();
public void run() { roomName = chatRoomName;
mChatWebView.loadUrl(String.format("javascript:CHAT_UI.joinRoom('%s', '%s');", chatRoomId, chatRoomName)); mChatWebView.post(new Runnable() {
} @Override
}); public void run() {
mChatWebView.loadUrl(String.format("javascript:CHAT_UI.startCollaboration('%s');", ABookCommConstants.FLAG.COLLABORATION_TYPE.AUDIO));
}
});
} else {
mChatWebView.post(new Runnable() {
@Override
public void run() {
mChatWebView.loadUrl(String.format("javascript:CHAT_UI.joinRoom('%s', '%s');", chatRoomId, chatRoomName));
}
});
}
} }
@JavascriptInterface @JavascriptInterface
......
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