Commit 86abd366 by Lee Munkyeong

文書協業実装

parent 2a462020
......@@ -91,6 +91,7 @@ import jp.agentec.abook.abv.bl.websocket.MeetingManager;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVAuthenticatedActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
......@@ -124,6 +125,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
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 DEFAULT_CHECKSUM = "0000000000";
//AISDevelop
......@@ -1373,33 +1375,47 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
@JavascriptInterface
public void startContentView() {
public void startContentView(String joinMeetingId) {
Integer meetingId;
Intent intent = new Intent();
Activity test = ActivityHandlingHelper.getInstance().getPreviousOfSettingActivity();
intent.putExtra("Comm", true);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
Stack<ABVAuthenticatedActivity> activityStack = ActivityHandlingHelper.getInstance().getCurrentActivityStack();
Activity testb = activityStack.get(activityStack.size()-2);
intent.setClass(testb, OperationRelatedContentActivity.class);
try {
connectMeetingServer();
List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey);
for (MeetingDto meeting : meetingList) {
if (meeting.title.equals("Comm_"+"testMK") && meetingManager.isOwner()) {
if (meeting.title.equals("Collaboration__"+roomId) && meetingManager.isOwner()) {
meetingManager.deleteMeeting(meeting.meetingId, mSkey);
}
}
if (collaborationJoinFlg == 0) {
meetingId = meetingManager.createMeeting(mSkey,"Collaboration_"+roomId, roomId.toString());
meetingManager.join(meetingId, mSkey, roomId.toString(), true);
} else {
meetingManager.join(Integer.parseInt(joinMeetingId), mSkey, roomId.toString(), true);
}
} catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "サーバに接続できませんでした。" + "');");
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
}
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
startActivity(intent, NaviConsts.Left);
//ActivityHandlingHelper.getInstance().checkContentActivity(Long.valueOf(3114), 0, intent);
}
@JavascriptInterface
public void startPipMode() {
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
enterPictureInPictureMode(mPipBuilder.build());
}
@JavascriptInterface
public void exitMeetingRoom() {
if (meetingManager.isOwner()) {
try {
meetingManager.deleteMeeting();
} catch (Exception e) {
Logger.e(TAG, "showMeetingExitDialog deleteMeeting error", e);
}
}
meetingManager.close();
ActivityHandlingHelper handlingHelper = ActivityHandlingHelper.getInstance();
handlingHelper.saveMeetingInfo(null, null, null, false);
}
}
......@@ -1485,6 +1501,14 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
});
break;
case 4:
mChatWebView.post(new Runnable() {
@Override
public void run() {
mChatWebView.loadUrl(DOCUMENT_COLLABORATION_PAGE_URL);
}
});
break;
default:
break;
}
......
......@@ -174,11 +174,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
@Override
public void run() {
try {
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
if (page != null) {
intent.putExtra(ABVActivity.PAGE, page);
}
startContentActivity(mContext, intent, null, Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK, contentId);
startContentActivity(mContext, intent, null, Intent.FLAG_ACTIVITY_SINGLE_TOP, contentId);
} catch (Exception e) {
Logger.e(TAG, "startContentActivity contentId=" + contentId, e);
showToast(mContext.getString(R.string.E113));
......@@ -384,11 +384,15 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
recordContentReadLog(context, contentId);
}
Activity act = getCurrentActivity();
if (act instanceof ChatWebviewActivity) {
act = getActivity(OperationRelatedContentActivity.class);
}
intent.setClass(act, ContentViewActivity.class);
if (!StringUtil.equalsAny(contentType,
ContentJSON.KEY_HTML_TYPE, ContentJSON.KEY_LINK_TYPE, ContentJSON.KEY_ENQUETE_TYPE, ContentJSON.KEY_EXAM_TYPE,
ContentJSON.KEY_PANO_MOVIE_TYPE, ContentJSON.KEY_PANO_IMAGE_TYPE, ContentJSON.KEY_OBJECTVR_TYPE)) {
context.startActivity(intent);
act.startActivity(intent);
}
}
......@@ -712,7 +716,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
*/
public synchronized void finishAllContentViewActivity() {
for (ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof ABVContentViewActivity) {
if (activity instanceof ABVContentViewActivity && !(activity instanceof ChatWebviewActivity)) {
activity.finish();
}
}
......@@ -729,7 +733,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
int activitySize = currentActivityStack.size();
for (int i = 1; i < activitySize - 1; i++) {
ABVAuthenticatedActivity activity = currentActivityStack.get(currentActivityStack.size() - i);
if (activity instanceof ABVContentViewActivity) {
if (activity instanceof ABVContentViewActivity && !(activity instanceof ChatWebviewActivity)) {
activity.finish();
}
}
......
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