Commit ce85c8bf by Lee Munkyeong

Merge branch 'communication/feature/change_collaboration' into 'communication/develop'

Communication/feature/change collaboration

See merge request !152
parents 263341ce c53f122e
......@@ -53,6 +53,7 @@ import jp.agentec.abook.abv.bl.acms.client.parameters.AddMemberGroupParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.AppStoreNewLoginParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.ArchiveDetailRequestParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.ArchiveRequestParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.ChangeCollaborationParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.ChangeRoomNameParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.CheckSendLogParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.ContentReadingLogParameters;
......@@ -808,6 +809,9 @@ public class AcmsClient implements AcmsClientResponseListener {
HttpResponse response = send(AcmsApis.ApigetCollaboration, new FinishCollaborationParameters(sid, AcmsApis.CollaborationCmds.finish, roomId));
}
public void changeCollaboration(String sid, int roomId, int changeCollaborationType, int meetingId) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetCollaboration, new ChangeCollaborationParameters(sid, AcmsApis.CollaborationCmds.change, roomId, changeCollaborationType, meetingId));
}
/**
* 協業内ユーザー招待
*
......
package jp.agentec.abook.abv.bl.acms.client.parameters;
import jp.agentec.adf.net.http.HttpParameterObject;
/**
* ACMSのAPIに渡す共通的なパラメータを格納します。ACMSのAPIのパラメータ用クラスを作成するときはこのクラスを継承してください。<br>
* ただし、このクラスはログイン状態の確認用として使われる {@link ChangeCollaborationParameters#sid} を持っているため、ログイン用のパラメータ {@link MobileLoginParameters} は、このクラスを継承する必要はありません。
* @author lee-mk
* @version 1.0.0
*/
public class ChangeCollaborationParameters extends HttpParameterObject {
/**
* セッションID
* @since 1.0.0
*/
private String sid;
private String cmd;
private Integer roomId;
private Integer collaborationType;
private Integer meetingId;
/**
* {@link ChangeCollaborationParameters} のインスタンスを初期化します。
* @param sid ログインした時のセッションIDです。
* @param cmd Apiリクエストに必要なコマンド(ABOOK COMM専用)。
* @param roomId roomId
* @param meetingId meetingId
* @since 1.0.0
*/
public ChangeCollaborationParameters(String sid, String cmd, Integer roomId, Integer collaborationType, Integer meetingId) {
this.sid = sid;
this.cmd = cmd;
this.roomId = roomId;
this.collaborationType = collaborationType;
this.meetingId = meetingId;
}
/**
* セッションIDを返します。
* @return ログインした時のセッションIDです。
* @since 1.0.0
*/
public String getSid() {
return sid;
}
/**
* コマンドを返します。
* @return ログインした時のセッションIDです。
* @since 1.0.0
*/
public String getCmd() {
return cmd;
}
/**
* roomIdを返します。
* @return roomId
* @since 1.0.0
*/
public Integer getRoomId() {
return roomId;
}
/**
* meetingIdを返します。
* @return meetingId
* @since 1.0.0
*/
public Integer getMeetingId() {
return meetingId;
}
/**
* collaborationTypeを返します。
* @return collaborationType
* @since 1.0.0
*/
public Integer getCollaborationType() {
return collaborationType;
}
}
......@@ -209,7 +209,7 @@ public class AcmsApis {
}
public static final class CollaborationCmds {
public static final String start = "1";
public static final String change = "1";
public static final String join = "2";
public static final String finish = "3";
public static final String invite = "4";
......
......@@ -519,8 +519,13 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showProgressPopup();
hideContentList();
MeetingManager meetingManager = MeetingManager.getInstance();
if (!meetingManager.isConnected()) {
backToHome();
}
MeetingManager meetingManager = MeetingManager.getInstance();
if (!meetingManager.isConnected()) {
ChatWebViewActivity chatWebViewActivity = activityHandlingHelper.getActivity(ChatWebViewActivity.class);
if (chatWebViewActivity != null && chatWebViewActivity.isInPictureInPictureMode()) {
getApplication().startActivity(new Intent(chatWebViewActivity, ChatWebViewActivity.class)
.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK));
}
}
} else {
......
......@@ -174,11 +174,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
@Override
public void run() {
try {
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | intent.FLAG_ACTIVITY_NEW_TASK);
if (page != null) {
intent.putExtra(ABVActivity.PAGE, page);
}
startContentActivity(mContext, intent, null, Intent.FLAG_ACTIVITY_SINGLE_TOP, contentId);
startContentActivity(mContext, intent, null, Intent.FLAG_ACTIVITY_SINGLE_TOP | intent.FLAG_ACTIVITY_NEW_TASK, contentId);
} catch (Exception e) {
Logger.e(TAG, "startContentActivity contentId=" + contentId, e);
showToast(mContext.getString(R.string.E113));
......@@ -293,6 +293,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
if (intent == null) {
intent = new Intent();
}
intent.putExtra(ABookKeys.CONTENT_ID, contentId);
intent.putExtra(FILEPATH, path);
intent.putExtra(ABookKeys.CONTENT_TYPE, contentType);
......@@ -384,20 +385,23 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
recordContentReadLog(context, contentId);
}
Activity targetActivity = getCurrentActivity();
if (targetActivity instanceof ChatWebViewActivity) {
Stack<ABVAuthenticatedActivity> stack = getCurrentActivityStack();
if (stack.size() > 1){
targetActivity = stack.get(stack.size()-2);
//AbookCommの文書協業の場合(ChatWebviewがPIPモードの場合)既存Contextでなく以前のActivityから画面を遷移する。
ChatWebViewActivity chatWebViewActivity = getActivity(ChatWebViewActivity.class);
if (chatWebViewActivity != null && chatWebViewActivity.isInPictureInPictureMode()) {
context = getCurrentActivity();
intent.removeFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | intent.FLAG_ACTIVITY_NEW_TASK);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
if (context instanceof ChatWebViewActivity) {
Stack<ABVAuthenticatedActivity> stack = getCurrentActivityStack();
if (stack.size() > 1){
context = stack.get(stack.size()-2);
}
}
}
intent.setClass(targetActivity, 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)) {
targetActivity.startActivity(intent);
context.startActivity(intent);
}
}
......
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