Commit e75deb32 by Lee Munkyeong

文書協業への変換実装中

parent 83b77e90
......@@ -123,20 +123,17 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
//private final String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public/networkError.html";
private final String CHAT_PAGE_URL = "file:///android_asset/chat/public_new/chat.html";
private final String CHAT_ROOM_PAGE_URL = "file:///android_asset/chat/public_new/chat_room.html";
private final String PICTURE_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_picture.html";
private final String VIDEO_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_video.html";
private final String VOICE_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_voice.html";
private final String DOCUMENT_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_documents.html";
private final String WHITE_BOARD_COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration_whiteboard.html";
private final String COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration.html";
private final String DEFAULT_CHECKSUM = "0000000000";
//AISDevelop
private JsInf jsInf = new JsInf();
private ValueCallback<Uri[]> mUploadMessage;
private String sid;
private String roomName;
private String loginId;
......@@ -151,6 +148,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
private String selectedUserIdList;
private String mSkey;
private Integer joinMeetingId;
private boolean isPIP;
// 0:協業生成, 1:協業参加
private Integer collaborationJoinFlg = 0;
......@@ -1397,7 +1395,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
@JavascriptInterface
public String createContentView() {
public int createContentView() {
Integer meetingId = null;
meetingManager.close();
activityHandlingHelper.removeContentViewActivity(activityHandlingHelper.getContentViewActivity());
......@@ -1418,7 +1416,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startContentListActivity(true);
return meetingId.toString();
return meetingId.intValue();
}
@JavascriptInterface
......@@ -1439,6 +1437,23 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
}
@JavascriptInterface
public void joinMeetingRoom(int newMeetingId) {
meetingManager.close();
activityHandlingHelper.removeContentViewActivity(activityHandlingHelper.getContentViewActivity());
try {
connectMeetingServer();
List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey);
meetingManager.join(newMeetingId, mSkey, roomId.toString(), false);
} catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
}
finishBeforeContentListActivity();
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startContentListActivity(false);
}
@JavascriptInterface
public void startPipMode() {
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
......@@ -1448,6 +1463,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
@JavascriptInterface
public void exitMeetingRoom() {
exitAndDeleteMeetingRoom();
finishPIPmode();
}
@JavascriptInterface
......@@ -1481,6 +1497,13 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
}
}
private void finishPIPmode() {
if (isPIP) {
getApplication().startActivity(new Intent(this, ChatWebViewActivity.class)
.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT));
}
}
public void exitAndDeleteMeetingRoom() {
if (meetingManager.isConnected() && meetingManager.isOwner()) {
try {
......@@ -1651,6 +1674,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
@Override
public void onPictureInPictureModeChanged (boolean isInPictureInPictureMode, Configuration newConfig) {
isPIP = isInPictureInPictureMode;
if (isInPictureInPictureMode) {
mChatWebView.loadUrl("javascript:$('.pip_indicator').removeClass('none');");
} else {
......
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