Commit bc755451 by onuma

Merge branch 'communication/develop_onuma' into 'communication/develop'

プッシュメッセージからチャットと協業に遷移する時、iOSと同じ遷移にした.

See merge request !206
parents ac488c42 b7220ec9
...@@ -46,7 +46,6 @@ public class ChatPushDataJSON extends AcmsCommonJSON { ...@@ -46,7 +46,6 @@ public class ChatPushDataJSON extends AcmsCommonJSON {
if (pushMessagetJsonArray.getJSONObject(k).length() == 0) { if (pushMessagetJsonArray.getJSONObject(k).length() == 0) {
break; break;
} }
PushMessageDto pushMessageDto = new PushMessageDto(); PushMessageDto pushMessageDto = new PushMessageDto();
String tempDate = DateTimeUtil.toString(DateTimeUtil.toDate(pushMessagetJsonArray.getJSONObject(k).getString(PushSendDate), DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmmssSSS_none); String tempDate = DateTimeUtil.toString(DateTimeUtil.toDate(pushMessagetJsonArray.getJSONObject(k).getString(PushSendDate), DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmmssSSS_none);
pushMessageDto.pushMessageId = Long.valueOf(tempDate); pushMessageDto.pushMessageId = Long.valueOf(tempDate);
......
...@@ -169,8 +169,9 @@ public interface ABookCommConstants { ...@@ -169,8 +169,9 @@ public interface ABookCommConstants {
String CONTACT_URL = "file:///android_asset/chat/public_new/contact.html"; String CONTACT_URL = "file:///android_asset/chat/public_new/contact.html";
String COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration.html"; String COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration.html";
String DEFAULT_CHECKSUM = "0000000000"; String DEFAULT_CHECKSUM = "0000000000";
String PLATFORM_NAME = "android"; String PLATFORM_NAME = "android";
String CHAT_MESSAGE_SEPERATOR = "<::split>";
String INVITE_COLLABORATION = "inviteCollaboration" + CHAT_MESSAGE_SEPERATOR;
int PUSH_MESSAGE_DLG_REQUEST_CODE = 200; int PUSH_MESSAGE_DLG_REQUEST_CODE = 200;
interface PUSH_MESSAGE_DLG_RESULT { interface PUSH_MESSAGE_DLG_RESULT {
......
package jp.agentec.abook.abv.cl.push;
import android.content.Intent;
import org.json.adf.JSONObject;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.adf.util.StringUtil;
/**
* プッシュメッセージをJSONにしたクラス
* 既存のデータのキーは、AppDefType.PushMessageKey
* チャットで追加されたデータのキーは、AppDefType.ChatPushMessageKey
*/
public class PushMessageJSON {
private JSONObject jsonObject;
public PushMessageJSON(String jsonText) {
jsonObject = new JSONObject(jsonText);
}
// プッシュメッセージデータ
public String getMessage() {
return jsonObject.getString(AppDefType.PushMessageKey.message);
}
public String getData() {
try {
return jsonObject.getString(AppDefType.PushMessageKey.data);
} catch (Exception e) {
return "";
}
}
public String getOperationID() {
try {
return jsonObject.getString(AppDefType.PushMessageKey.operationId);
} catch (Exception e) {
return "";
}
}
// ここからチャットデータ
public String getRoomName() {
try {
return jsonObject.getString(AppDefType.ChatPushMessageKey.roomName);
} catch (Exception e){
return "";
}
}
public Long getRoomId() {
try {
return jsonObject.getLong(AppDefType.ChatPushMessageKey.roomId);
} catch (Exception e){
return new Long(0);
}
}
public String getRoomType() {
try {
int roomType = jsonObject.getInt(AppDefType.ChatPushMessageKey.roomType);
return Integer.toString(roomType);
} catch (Exception e){
return "";
}
}
public String getPushSendLoginId() {
try {
return jsonObject.getString(AppDefType.ChatPushMessageKey.pushSendLoginId);
} catch (Exception e) {
return "";
}
}
public long getPushSendDate() {
try {
return jsonObject.getLong(AppDefType.ChatPushMessageKey.pushSendDate);
} catch (Exception e) {
return 0;
}
}
public boolean isCollaboration() {
String message = getMessage();
if (message.contains(ABookCommConstants.INVITE_COLLABORATION)) {
return true;
}
return false;
}
public String getCollaborationType() {
try {
String message = getMessage();
if (message.contains(ABookCommConstants.INVITE_COLLABORATION)) {
String[] inviteMessage = message.split(ABookCommConstants.CHAT_MESSAGE_SEPERATOR);
return inviteMessage[1];
}
return jsonObject.getString(AppDefType.ChatPushMessageKey.collaborationType);
} catch (Exception e) {
return "";
}
}
}
...@@ -30,6 +30,7 @@ import com.google.firebase.iid.FirebaseInstanceId; ...@@ -30,6 +30,7 @@ import com.google.firebase.iid.FirebaseInstanceId;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
...@@ -68,6 +69,7 @@ import jp.agentec.abook.abv.bl.logic.MemoLogic; ...@@ -68,6 +69,7 @@ import jp.agentec.abook.abv.bl.logic.MemoLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic; import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.bl.logic.UserAuthenticateLogic; import jp.agentec.abook.abv.bl.logic.UserAuthenticateLogic;
import jp.agentec.abook.abv.cl.helper.ABVUncaughtExceptionHandler; import jp.agentec.abook.abv.cl.helper.ABVUncaughtExceptionHandler;
import jp.agentec.abook.abv.cl.push.PushMessageJSON;
import jp.agentec.abook.abv.cl.util.PreferenceUtil; import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.cl.util.StorageUtil; import jp.agentec.abook.abv.cl.util.StorageUtil;
import jp.agentec.abook.abv.launcher.android.ABVApplication; import jp.agentec.abook.abv.launcher.android.ABVApplication;
...@@ -159,12 +161,9 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -159,12 +161,9 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
int PAYMENT = 3; int PAYMENT = 3;
} }
// ABookCommunicationで使用する。 // 遷移元のアクティビティ名
private Long roomId = new Long(0); // PushMessage受信時に直接ChatRoomへ行かずに、ひとつまえのActivityに戻る為に使用する。
private String roomName = ""; public String baseActivityName;
private String collaborationType = "";
private String roomType = "";
private String fromClassName = "";
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -1247,61 +1246,77 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -1247,61 +1246,77 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
} }
/** /**
* プッシュメッセージ受信後のダイアログを表示する。 * プッシュメッセージがあるので、チャットルームに遷移する。
* @param context コンテキスト
* @param textMessage プッシュメッセージ
* @param data Intentに付属するデータ
* @param operationID operationID
* @param roomID roomID
* @param roomName roomName
* @param roomType roomType
* @param pushSendLoginId pushSendLoginId
* @param pushSendDate pushSendDate
* @param collaborationType ABookCommConstants.COLLABORATION_TYPE のいずれか
*/ */
public void showChatRoomPopupMessage( public boolean goChatRoom(final Intent intent, final String nextActivityName, final String fromActivityName) {
Context context, if (!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
String textMessage, intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
String data,
String operationID,
Long roomID,
String roomName,
String roomType,
String pushSendLoginId,
long pushSendDate,
String collaborationType,
String fromClassName
) {
Intent pushMsgDialog = new Intent(context, ShowPushMessageDailogActivity.class);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, textMessage);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.data, data);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.operationId, operationID);
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomId, roomID);
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, pushSendLoginId);
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, pushSendDate);
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.fromClassName, fromClassName);
this.roomId = roomID;
this.roomName = roomName;
this.collaborationType = collaborationType;
this.roomType = roomType;
this.fromClassName = fromClassName;
startActivityForResult(pushMsgDialog, ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE); handler.postDelayed(new Runnable() {
@Override
public void run() {
if (!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.roomType)) &&
!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.collaborationType))
) {
// roomTypeと、collaborationType が存在する場合は、協業を開始する。
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName),
intent.getStringExtra(AppDefType.ChatPushMessageKey.collaborationType),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomType),
nextActivityName,
fromActivityName);
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName),
nextActivityName,
fromActivityName);
}
}
}, 500);
return true;
}
return false;
} }
/** /**
* チャットルームへ遷移する。 * プッシュメッセージ受信後のダイアログを表示する。
* @param context コンテキスト
* @param messageMap プッシュメッセージ
*/ */
public void goChatRoom() { public void showChatRoomPopupMessage(Context context, Map<String, String> messageMap) {
if (roomId <= 0 && StringUtil.isNullOrEmpty(roomName)) { String messageBody = messageMap.get(AppDefType.PushMessageKey.message);
if (StringUtil.isNullOrEmpty(messageBody)) {
return; return;
} }
if (StringUtil.isNullOrEmpty(collaborationType)) { PushMessageJSON json = new PushMessageJSON(messageBody);
ActivityHandlingHelper.getInstance().startChatWebViewActivity(fromClassName, roomId, roomName, roomType);
// 協業
String messageText = json.getMessage();
if (json.isCollaboration()) {
messageText = getString(R.string.msg_invite_collaboration);
}
Intent pushMsgDialog = new Intent(context, ShowPushMessageDailogActivity.class);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, messageText);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.data, json.getData());
pushMsgDialog.putExtra(AppDefType.PushMessageKey.operationId, json.getOperationID());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomId, json.getRoomId());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomName, json.getRoomName());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, json.getPushSendLoginId());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, json.getPushSendDate());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomType, json.getRoomType());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.collaborationType, json.getCollaborationType());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, messageMap.get(AppDefType.ChatPushMessageKey.fromActivityName));
String newVersion = messageMap.get(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (newVersion != null && newVersion.equals(new String("true"))) {
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen, true);
} else { } else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(fromClassName, roomId, roomName, collaborationType, roomType); pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen, false);
} }
startActivityForResult(pushMsgDialog, ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE);
} }
} }
...@@ -17,7 +17,6 @@ import android.view.View; ...@@ -17,7 +17,6 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
...@@ -41,7 +40,6 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment; ...@@ -41,7 +40,6 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Callback; import jp.agentec.abook.abv.bl.common.Callback;
import jp.agentec.abook.abv.bl.common.CommonExecutor; import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant; import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys; import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache; import jp.agentec.abook.abv.bl.data.ABVDataCache;
...@@ -72,12 +70,10 @@ import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; ...@@ -72,12 +70,10 @@ import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil; import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper; import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper; import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.NoPdfViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.NoPdfViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.PhotoEditActivity; import jp.agentec.abook.abv.ui.viewer.activity.PhotoEditActivity;
...@@ -163,6 +159,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -163,6 +159,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
isLinkedContent = intent.getBooleanExtra("isLinkedContent", false); isLinkedContent = intent.getBooleanExtra("isLinkedContent", false);
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1); mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1);
// 遷移元のActivity
baseActivityName = getIntent().getStringExtra(AppDefType.ChatPushMessageKey.fromActivityName);
if (!isLinkedContent) { if (!isLinkedContent) {
operationDto = AbstractLogic.getLogic(OperationLogic.class).getOperation(mOperationId); operationDto = AbstractLogic.getLogic(OperationLogic.class).getOperation(mOperationId);
mXWalkOpenType = intent.getIntExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.DEFAULT); mXWalkOpenType = intent.getIntExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.DEFAULT);
......
...@@ -392,6 +392,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity { ...@@ -392,6 +392,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, extras.getString(AppDefType.ChatPushMessageKey.pushSendLoginId)); // sendLoginId intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, extras.getString(AppDefType.ChatPushMessageKey.pushSendLoginId)); // sendLoginId
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, extras.getLong(AppDefType.ChatPushMessageKey.pushSendDate)); intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, extras.getLong(AppDefType.ChatPushMessageKey.pushSendDate));
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, extras.getString(AppDefType.ChatPushMessageKey.roomType)); intent.putExtra(AppDefType.ChatPushMessageKey.roomType, extras.getString(AppDefType.ChatPushMessageKey.roomType));
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, extras.getString(AppDefType.ChatPushMessageKey.collaborationType));
} }
} }
intent.setClassName(getApplicationContext().getPackageName(), getMainActivityClassName()).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setClassName(getApplicationContext().getPackageName(), getMainActivityClassName()).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
......
package jp.agentec.abook.abv.ui.common.activity; package jp.agentec.abook.abv.ui.common.activity;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants; import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
...@@ -17,6 +16,7 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; ...@@ -17,6 +16,7 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil; import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
...@@ -125,8 +125,13 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -125,8 +125,13 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
isCollabration = MeetingManager.getInstance().isCollaboration(); isCollabration = MeetingManager.getInstance().isCollaboration();
Bundle extras = getIntent().getExtras(); Bundle extras = getIntent().getExtras();
if (extras != null && !isMeetingRoomConnected) { if (extras != null && !isMeetingRoomConnected) {
boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (isNewVersion) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent()); setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
finish(); finish();
} else {
moveChatRoom(extras);
}
} }
if (isMeetingRoomConnected || isCollabration) { if (isMeetingRoomConnected || isCollabration) {
showCannotMoveChatRoomDialog(); showCannotMoveChatRoomDialog();
...@@ -147,6 +152,29 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -147,6 +152,29 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
} }
/** /**
* チャットルームへ遷移するための処理
* @param extras
*/
private void moveChatRoom(Bundle extras) {
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
String roomName = extras.getString(AppDefType.ChatPushMessageKey.roomName);
String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName, ChatWebViewActivity.class.getName(),"");
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId,
roomName,
collaborationType,
roomType,
ChatWebViewActivity.class.getName(),
"");
}
}
}
/**
* 遠隔支援中(会議室接続中)はチャットルームにはいけない。 * 遠隔支援中(会議室接続中)はチャットルームにはいけない。
*/ */
private void showCannotMoveChatRoomDialog() { private void showCannotMoveChatRoomDialog() {
......
...@@ -145,8 +145,9 @@ public interface AppDefType { ...@@ -145,8 +145,9 @@ public interface AppDefType {
String pushSendDate = "pushSendDate"; String pushSendDate = "pushSendDate";
String collaborationType = "collaborationType"; String collaborationType = "collaborationType";
String roomType = "roomType"; String roomType = "roomType";
String fromClassName = "fromClassName";
String shopName = "shopName"; String shopName = "shopName";
String loginId = "loginId"; String loginId = "loginId";
String fromActivityName = "fromActivityName";
String needsDisplayOperationOrOperationRelatedContentScreen = "needsDisplayOperationOrOperationRelatedContentScreen";
} }
} }
...@@ -166,6 +166,9 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -166,6 +166,9 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
chatData.setIsOnline(false); chatData.setIsOnline(false);
chatData.setContext(ChatWebViewActivity.this); chatData.setContext(ChatWebViewActivity.this);
chatData.setIsMobile(!isNormalSize()); chatData.setIsMobile(!isNormalSize());
// どのアクティビティから遷移してきたか保存
baseActivityName = intent.getStringExtra(AppDefType.ChatPushMessageKey.fromActivityName);
} }
private void setupChatWebView() { private void setupChatWebView() {
...@@ -307,7 +310,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -307,7 +310,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
result = startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true); result = startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true);
// 動画が選択された場合 // 動画が選択された場合
} else if (fileChooserParams.getAcceptTypes()[0].toLowerCase().contains(ABookKeys.VIDEO)) { } else if (fileChooserParams.getAcceptTypes()[0].toLowerCase().contains(ABookKeys.VIDEO)) {
result = startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_VIDEO, "Camera", ABookKeys.VIDEO, true); result = startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
} }
if (result) { if (result) {
if (mUploadMessage != null) { if (mUploadMessage != null) {
...@@ -776,13 +779,20 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -776,13 +779,20 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
/** /**
* 作業一覧へ遷移 * 作業一覧へ遷移
*
*/ */
public void backToHome() { public void backToHome() {
mChatWebView.leaveRoom(); mChatWebView.leaveRoom();
exitAndDeleteMeetingRoom(); exitAndDeleteMeetingRoom();
finish(); finish();
// 戻るの作業一覧か、関連資料のどちらかのActivityのみ
Intent intent = new Intent(); Intent intent = new Intent();
if (OperationListActivity.class.getName().equals(baseActivityName)) {
intent.setClass(ChatWebViewActivity.this, OperationListActivity.class); intent.setClass(ChatWebViewActivity.this, OperationListActivity.class);
} else {
intent.setClass(ChatWebViewActivity.this, OperationRelatedContentActivity.class);
}
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent, NaviConsts.Left); startActivity(intent, NaviConsts.Left);
} }
......
...@@ -7,6 +7,7 @@ import android.content.Intent; ...@@ -7,6 +7,7 @@ import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.view.Gravity; import android.view.Gravity;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
...@@ -97,6 +98,7 @@ import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView; ...@@ -97,6 +98,7 @@ import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView;
import jp.agentec.abook.abv.ui.common.view.ABVListDialog; import jp.agentec.abook.abv.ui.common.view.ABVListDialog;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.adapter.HierarchyOperationGroupListAdapter; import jp.agentec.abook.abv.ui.home.adapter.HierarchyOperationGroupListAdapter;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper; import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper; import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper;
...@@ -557,18 +559,8 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -557,18 +559,8 @@ public class OperationListActivity extends ABVUIActivity {
screenRefresh(); screenRefresh();
// プッシュメッセージ処理 // プッシュメッセージがある場合の処理
if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) && if (goChatRoom(getIntent(), ChatWebViewActivity.class.getName(), OperationListActivity.class.getName())) {
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
handler.postDelayed(new Runnable() {
@Override
public void run() {
ActivityHandlingHelper.getInstance().startChatWebViewActivity("",
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomType));
}
},1000);
return; return;
} }
...@@ -813,6 +805,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -813,6 +805,7 @@ public class OperationListActivity extends ABVUIActivity {
intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId); intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId);
intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.TASK_REPORT); intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.TASK_REPORT);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, OperationListActivity.class.getName());
if(operationDto.operationType == OperationType.PDF) { if(operationDto.operationType == OperationType.PDF) {
intent.putExtra("LINKURL", "file://" + path); intent.putExtra("LINKURL", "file://" + path);
...@@ -1030,6 +1023,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1030,6 +1023,7 @@ public class OperationListActivity extends ABVUIActivity {
intent.putExtra(ABookKeys.CONTENT_ID, operationDto.contentId); intent.putExtra(ABookKeys.CONTENT_ID, operationDto.contentId);
intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId); intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId);
intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.PANO_EDIT); intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.PANO_EDIT);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, OperationListActivity.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(OperationListActivity.this, HTMLXWalkWebViewActivity.class); intent.setClass(OperationListActivity.this, HTMLXWalkWebViewActivity.class);
ActivityHandlingHelper.getInstance().startHTMLXWalkWebActivity(OperationListActivity.this, intent, url, operationDto.contentId, -1, -1, -1, -1, -1); ActivityHandlingHelper.getInstance().startHTMLXWalkWebActivity(OperationListActivity.this, intent, url, operationDto.contentId, -1, -1, -1, -1, -1);
...@@ -1300,10 +1294,12 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1300,10 +1294,12 @@ public class OperationListActivity extends ABVUIActivity {
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) { protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode,requestCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) { if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) {
goChatRoom(); goChatRoom(intent, ChatWebViewActivity.class.getName(), OperationListActivity.class.getName());
} }
return; return;
} }
......
...@@ -287,6 +287,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -287,6 +287,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
} }
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, OperationRelatedContentActivity.class.getName());
ActivityHandlingHelper.getInstance().checkContentActivity(contentId, 0, intent); ActivityHandlingHelper.getInstance().checkContentActivity(contentId, 0, intent);
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -542,21 +543,10 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -542,21 +543,10 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
updateCollaborationInfo(); updateCollaborationInfo();
refreshCollaborationUI(); refreshCollaborationUI();
super.onResume(); super.onResume();
showOperationRelatedContentList(); if(goChatRoom(getIntent(), ChatWebViewActivity.class.getName(), OperationRelatedContentActivity.class.getName())) {
if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
handler.postDelayed(new Runnable() {
@Override
public void run() {
ActivityHandlingHelper.getInstance().startChatWebViewActivity("",
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomType));
}
},1000);
return; return;
} }
showOperationRelatedContentList();
} }
@Override @Override
...@@ -613,8 +603,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -613,8 +603,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) { if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) {
backToHome(); finish();
goChatRoom(); goChatRoom(intent, ChatWebViewActivity.class.getName(), getClass().getName());
} }
return; return;
} }
......
...@@ -1632,7 +1632,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1632,7 +1632,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
//プシュメッセージ一覧からチャットに入る //プシュメッセージ一覧からチャットに入る
public void startChatWebViewActivityWithPushMessage(PushMessageDto dto) { public void startChatWebViewActivityWithPushMessage(PushMessageDto dto) {
String className = ChatWebViewActivity.class.getName(); String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/"); intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
...@@ -1643,7 +1642,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1643,7 +1642,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId); intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName); intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
if (dto != null) { if (dto != null) {
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, dto.roomId); intent.putExtra(AppDefType.ChatPushMessageKey.loginId, dto.roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, dto.roomName); intent.putExtra(AppDefType.ChatPushMessageKey.roomName, dto.roomName);
} }
intent.setClassName(mContext.getPackageName(), className); intent.setClassName(mContext.getPackageName(), className);
...@@ -1654,7 +1653,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1654,7 +1653,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
//チャットに入る //チャットに入る
public void startChatWebViewActivity() { public void startChatWebViewActivity() {
String className = ChatWebViewActivity.class.getName(); String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/"); intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
String sid = ABVDataCache.getInstance().getMemberInfo().sid; String sid = ABVDataCache.getInstance().getMemberInfo().sid;
...@@ -1669,49 +1667,13 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1669,49 +1667,13 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
/** /**
* プシュメッセージからチャットに入る
*/
public void startChatWebViewActivity(String fromClassName, Long roomId, String roomName, String roomType) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
String sid = ABVDataCache.getInstance().getMemberInfo().sid;
intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
String nextActivity = null;
if (fromClassName.equals(HTMLWebViewActivity.class.getName())) {
nextActivity = OperationListActivity.class.getName();
} else if(fromClassName.equals(ContentViewActivity.class.getName())){
nextActivity = OperationRelatedContentActivity.class.getName();
} else {
nextActivity = className;
}
intent.setClassName(mContext.getPackageName(), nextActivity);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent);
}
/**
* プシュメッセージからチャットに遷移する * プシュメッセージからチャットに遷移する
* fromClassName の値によっては、作業一覧、コンテンツ一覧のどちらかに戻ってから、チャットに遷移する) * @param roomId chatRoom の Id
* @param fromClassName 呼び出し元のクラス名( * @param roomName chatRoom の名前
* @param roomId roomId * @param targetActivityName 直接chatRoom に遷移する場合は、ChatWebViewActivity名。chatRoomに遷移する前に、別のActivityを経由する場合は、そのActivity名
* @param roomName room * @param fromActivityName この関数を呼び出したActivity名
* @param roomType roomaType
* @param collaborationType ABookCommConstants.COLLABORATION_TYPE のいずれか
*/ */
public void startChatWebViewActivityWithCollaboration(String fromClassName, Long roomId, String roomName, String roomType, String collaborationType) { public void startChatWebViewActivity(Long roomId, String roomName, String targetActivityName, String fromActivityName) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/"); intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
String sid = ABVDataCache.getInstance().getMemberInfo().sid; String sid = ABVDataCache.getInstance().getMemberInfo().sid;
...@@ -1719,22 +1681,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1719,22 +1681,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId; String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath(); String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId); intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, collaborationType);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName); intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId); intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName); intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType); intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, fromActivityName);
intent.setClassName(mContext.getPackageName(), targetActivityName);
String nextActivity = null;
if (fromClassName.equals(HTMLWebViewActivity.class.getName())) {
nextActivity = OperationListActivity.class.getName();
} else if(fromClassName.equals(ContentViewActivity.class.getName())){
nextActivity = OperationRelatedContentActivity.class.getName();
} else {
nextActivity = className;
}
intent.setClassName(mContext.getPackageName(), nextActivity);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent); getCurrentActivity().startActivity(intent);
} }
...@@ -1965,6 +1916,32 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1965,6 +1916,32 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
/** /**
* プッシュメッセージから協業に遷移する
* @param roomId
* @param roomName
* @param collaborationType
* @param roomType
*/
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType, String nextActivityName, String fromActivityName) {
Intent intent = new Intent();
intent.putExtra("chatWebviewUrl", ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
String sid = ABVDataCache.getInstance().getMemberInfo().sid;
intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, collaborationType);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, fromActivityName);
intent.setClassName(mContext.getPackageName(), nextActivityName);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent);
}
/**
* 図面タイプのみ利用 * 図面タイプのみ利用
* OZ画面閉じた後、タスクアイコンの再描画 * OZ画面閉じた後、タスクアイコンの再描画
* @param taskKey * @param taskKey
......
...@@ -120,7 +120,6 @@ import jp.agentec.abook.abv.cl.util.PreferenceUtil; ...@@ -120,7 +120,6 @@ import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.launcher.android.R.id; import jp.agentec.abook.abv.launcher.android.R.id;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity; import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.activity.ShowPushMessageDailogActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppColor; import jp.agentec.abook.abv.ui.common.appinfo.AppColor;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey;
...@@ -3828,10 +3827,10 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -3828,10 +3827,10 @@ public class ContentViewActivity extends ABVContentViewActivity {
Uri dataUri = null; Uri dataUri = null;
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) { // プッシュメッセージダイアログのリザルトだった場合
// Activityを閉じて遷移する if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
exitActivity(); finishActivity();
goChatRoom(); goChatRoom(intent, baseActivityName, ContentViewActivity.class.getName());
} }
return; return;
} }
...@@ -3849,7 +3848,7 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -3849,7 +3848,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
case WEBVIEW: case WEBVIEW:
case PREVIEW: case PREVIEW:
isAnotherViewOpenFlg = false; isAnotherViewOpenFlg = false;
// playPageBGMSound(mCurrentPageNumber); //프리뷰 모드 일때 음악재생 Bug //playPageBGMSound(mCurrentPageNumber); //프리뷰 모드 일때 음악재생 Bug
break; break;
case ABookCommConstants.ABOOK_CHECK_TASK_IMAGE: case ABookCommConstants.ABOOK_CHECK_TASK_IMAGE:
if (mUploadMessage == null) { if (mUploadMessage == null) {
...@@ -5540,4 +5539,6 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -5540,4 +5539,6 @@ public class ContentViewActivity extends ABVContentViewActivity {
public void reloadPdfTaskIcon(String taskKey) { public void reloadPdfTaskIcon(String taskKey) {
operationTaskLayout.setIconStatus(taskKey,false); operationTaskLayout.setIconStatus(taskKey,false);
} }
} }
...@@ -57,8 +57,6 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic; ...@@ -57,8 +57,6 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.cl.util.ContentLogUtil; import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ShowPushMessageDailogActivity;
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.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts; import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
...@@ -66,6 +64,7 @@ import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; ...@@ -66,6 +64,7 @@ import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.adf.util.StringUtil;
//TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約 //TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約
public class HTMLWebViewActivity extends ParentWebViewActivity { public class HTMLWebViewActivity extends ParentWebViewActivity {
...@@ -747,13 +746,14 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -747,13 +746,14 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
} }
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) { protected void onActivityResult(int requestCode, int resultCode, final Intent intent) {
super.onActivityResult(requestCode, resultCode, intent); super.onActivityResult(requestCode, resultCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) { // プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
finishActivity(); finishActivity();
goChatRoom(); goChatRoom(intent, baseActivityName, HTMLWebViewActivity.class.getName());
} }
return; return;
} }
......
package jp.agentec.abook.abv.ui.viewer.activity; package jp.agentec.abook.abv.ui.viewer.activity;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
...@@ -12,17 +13,16 @@ import android.widget.ImageButton; ...@@ -12,17 +13,16 @@ import android.widget.ImageButton;
import java.util.ArrayList; import java.util.ArrayList;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON; import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao; import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao; import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity; import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.appinfo.options.Options;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.StringUtil;
// TODO: later 遠隔連動関連はContentView,HTMLWebViewと共通しているので要集約 // TODO: later 遠隔連動関連はContentView,HTMLWebViewと共通しているので要集約
public class NoPdfViewActivity extends ABVContentViewActivity { public class NoPdfViewActivity extends ABVContentViewActivity {
...@@ -209,4 +209,17 @@ public class NoPdfViewActivity extends ABVContentViewActivity { ...@@ -209,4 +209,17 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
layout.addView(view); layout.addView(view);
} }
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, requestCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
finishActivity();
goChatRoom(intent, baseActivityName, getClass().getName());
}
return;
}
}
} }
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