Commit 09e97798 by onuma

チャットルームへ遷移する関数を作成

parent d1d7ccfa
...@@ -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;
...@@ -40,6 +41,7 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment; ...@@ -40,6 +41,7 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment;
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.AlertMessageLevel; import jp.agentec.abook.abv.bl.common.Constant.AlertMessageLevel;
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.exception.ABVException; import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode; import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
...@@ -67,6 +69,7 @@ import jp.agentec.abook.abv.bl.logic.MemoLogic; ...@@ -67,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;
...@@ -158,6 +161,13 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -158,6 +161,13 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
int PAYMENT = 3; int PAYMENT = 3;
} }
// ABookCommunicationでチャットの情報を格納しておく
private Long roomId = new Long(0);
private String roomName = "";
private String collaborationType = "";
private String roomType = "";
private String fromClassName = "";
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
...@@ -1235,4 +1245,129 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -1235,4 +1245,129 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
return existUnreadFlg; return existUnreadFlg;
} }
/**
* プッシュメッセージ受信後のダイアログを表示する。
* @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(
Context context,
String textMessage,
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);
}
*/
/**
* チャットルームへ遷移する。
*/
/**
public void goChatRoom() {
if (roomId <= 0 && StringUtil.isNullOrEmpty(roomName)) {
return;
}
if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName, "");
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType, roomType, "");
}
}
*/
/**
* ッシュメッセージがあるので、チャットルームに遷移する。
*/
public void goChatRoom(final Intent intent, final String fromClassName) {
if (!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
handler.postDelayed(new Runnable() {
@Override
public void run() {
Logger.d(TAG,"fromClassName = " + fromClassName);
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),
intent.getStringExtra(AppDefType.ChatPushMessageKey.fromClassName));
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName),"");
}
}
}, 500);
}
}
/**
* プッシュメッセージ受信後のダイアログを表示する。
* @param context コンテキスト
* @param messageMap プッシュメッセージ
*/
public void showChatRoomPopupMessage(Context context, Map<String, String> messageMap) {
String messageBody = messageMap.get(AppDefType.PushMessageKey.message);
PushMessageJSON json;
if (StringUtil.isNullOrEmpty(messageBody)) {
return;
}
json = new PushMessageJSON(messageBody);
Intent pushMsgDialog = new Intent(context, ShowPushMessageDailogActivity.class);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, json.getMessage());
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.fromClassName, messageMap.get(AppDefType.ChatPushMessageKey.fromClassName));
/**
this.roomId = roomID;
this.roomName = roomName;
this.collaborationType = collaborationType;
this.roomType = roomType;
this.fromClassName = fromClassName;
*/
startActivityForResult(pushMsgDialog, ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE);
}
} }
...@@ -3,6 +3,7 @@ package jp.agentec.abook.abv.ui.common.activity; ...@@ -3,6 +3,7 @@ package jp.agentec.abook.abv.ui.common.activity;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.os.Bundle; import android.os.Bundle;
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.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
...@@ -123,7 +124,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -123,7 +124,7 @@ 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) {
moveChatRoom(extras); setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
finish(); finish();
} }
if (isMeetingRoomConnected || isCollabration) { if (isMeetingRoomConnected || isCollabration) {
...@@ -134,6 +135,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -134,6 +135,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.CANCEL, getIntent());
finish(); finish();
} }
}); });
...@@ -147,6 +149,8 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -147,6 +149,8 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
* チャットルームへ遷移するための処理 * チャットルームへ遷移するための処理
* @param extras * @param extras
*/ */
/** ここでチャットルームには移動させない */
/**
private void moveChatRoom(Bundle extras) { private void moveChatRoom(Bundle extras) {
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0); Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
String roomName = extras.getString(AppDefType.ChatPushMessageKey.roomName); String roomName = extras.getString(AppDefType.ChatPushMessageKey.roomName);
...@@ -161,6 +165,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -161,6 +165,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
} }
} }
} }
*/
/** /**
* 遠隔支援中(会議室接続中)はチャットルームにはいけない。 * 遠隔支援中(会議室接続中)はチャットルームにはいけない。
......
...@@ -776,6 +776,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -776,6 +776,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
/** /**
* 作業一覧へ遷移 * 作業一覧へ遷移
*
*/ */
public void backToHome() { public void backToHome() {
mChatWebView.leaveRoom(); mChatWebView.leaveRoom();
......
...@@ -63,6 +63,7 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor; ...@@ -63,6 +63,7 @@ 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.ReportType; import jp.agentec.abook.abv.bl.common.Constant.ReportType;
import jp.agentec.abook.abv.bl.common.Constant.TaskReportLevel; import jp.agentec.abook.abv.bl.common.Constant.TaskReportLevel;
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.exception.ABVException; import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode; import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
...@@ -354,24 +355,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -354,24 +355,6 @@ public class OperationListActivity extends ABVUIActivity {
alertDialog.show(); alertDialog.show();
} }
} }
// プッシュメッセージがある場合
else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomType)) &&
!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.collaborationType))
) {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.collaborationType),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomType));
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName));
}
}
// リスト更新 // リスト更新
setOperationListView(); setOperationListView();
...@@ -532,6 +515,11 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -532,6 +515,11 @@ public class OperationListActivity extends ABVUIActivity {
return; return;
} }
refreshOperationList(); refreshOperationList();
// プッシュメッセージがある場合の処理
getIntent().putExtra(AppDefType.ChatPushMessageKey.fromClassName, this.getClass().getName());
goChatRoom(getIntent(), "");
// 報告画面から作業一覧へ戻った時の同期処理 // 報告画面から作業一覧へ戻った時の同期処理
final long operationId = getUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, -1L); final long operationId = getUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, -1L);
if (operationId != -1) { if (operationId != -1) {
...@@ -569,6 +557,37 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -569,6 +557,37 @@ public class OperationListActivity extends ABVUIActivity {
configurationToolbarIcon(); configurationToolbarIcon();
} }
/**
* ッシュメッセージがあるので、チャットルームに遷移する。
*/
/*
public void goChatRoom(final Intent intent) {
if (!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
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), "");
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName), "");
}
}
}, 500);
}
}
*/
// 検索ダイアログ表示 // 検索ダイアログ表示
private void showSearchDialog() { private void showSearchDialog() {
contentRefresher.stopRefresh(); contentRefresher.stopRefresh();
...@@ -1261,6 +1280,15 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1261,6 +1280,15 @@ 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 (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) {
goChatRoom(intent, "");
}
return;
}
activityResultFlg = true; activityResultFlg = true;
Uri result = (intent == null || resultCode != RESULT_OK) ? null : intent.getData(); Uri result = (intent == null || resultCode != RESULT_OK) ? null : intent.getData();
//ベースファイル登録した後にシーン画像選択画面閉じた後に呼ばれる //ベースファイル登録した後にシーン画像選択画面閉じた後に呼ばれる
......
...@@ -26,6 +26,7 @@ import java.util.Stack; ...@@ -26,6 +26,7 @@ import java.util.Stack;
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.acms.type.AcmsApis; import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.exception.ExceptionHandler; import jp.agentec.abook.abv.bl.common.exception.ExceptionHandler;
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;
...@@ -595,4 +596,17 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -595,4 +596,17 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
super.showAlertDialog(alertDialog); super.showAlertDialog(alertDialog);
} }
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) {
//backToHome();
finish();
goChatRoom(intent, "");
}
return;
}
}
} }
...@@ -1668,8 +1668,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1668,8 +1668,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
getCurrentActivity().startActivity(intent); getCurrentActivity().startActivity(intent);
} }
// プシュメッセージからチャットに入る /**
public void startChatWebViewActivity(Long roomId, String roomName) { * プシュメッセージからチャットに遷移する
* @param roomId
* @param roomName
*/
public void startChatWebViewActivity(Long roomId, String roomName, String nextActivityName) {
String className = ChatWebViewActivity.class.getName(); String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL; boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent(); Intent intent = new Intent();
...@@ -1682,7 +1686,19 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1682,7 +1686,19 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
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.setClassName(mContext.getPackageName(), className);
String nextActivity = className;
//if (fromClassName.equals(HTMLWebViewActivity.class.getName())) {
// フォームからきたら
//nextActivity = OperationListActivity.class.getName();
//} else if(fromClassName.equals(ContentViewActivity.class.getName())){
// 資料からきたら
//nextActivity = OperationRelatedContentActivity.class.getName();
//}
//intent.setClassName(mContext.getPackageName(), 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);
} }
...@@ -1912,7 +1928,14 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1912,7 +1928,14 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
this.previousOfSettingActivity2 = activity; this.previousOfSettingActivity2 = activity;
} }
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType) { /**
* プッシュメッセージから協業に遷移する
* @param roomId
* @param roomName
* @param collaborationType
* @param roomType
*/
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType, String fromClassName) {
String className = ChatWebViewActivity.class.getName(); String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL; boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent(); Intent intent = new Intent();
......
...@@ -94,6 +94,7 @@ import jp.agentec.abook.abv.bl.acms.type.OperationType; ...@@ -94,6 +94,7 @@ import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
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.exception.ExceptionHandler; import jp.agentec.abook.abv.bl.common.exception.ExceptionHandler;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
...@@ -3829,7 +3830,16 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -3829,7 +3830,16 @@ public class ContentViewActivity extends ABVContentViewActivity {
Uri[] result = null; Uri[] result = null;
Uri dataUri = null; Uri dataUri = null;
if (intent != null && resultCode == RESULT_OK) { // プッシュメッセージダイアログのリザルトだった場合
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) {
finishActivity();
goChatRoom(intent, "");
}
return;
}
if (intent != null && resultCode == RESULT_OK) {
String dataString = intent.getDataString(); String dataString = intent.getDataString();
if (dataString != null) { if (dataString != null) {
dataUri = Uri.parse(dataString); dataUri = Uri.parse(dataString);
...@@ -3844,7 +3854,7 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -3844,7 +3854,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
isAnotherViewOpenFlg = false; isAnotherViewOpenFlg = false;
// playPageBGMSound(mCurrentPageNumber); //프리뷰 모드 일때 음악재생 Bug // playPageBGMSound(mCurrentPageNumber); //프리뷰 모드 일때 음악재생 Bug
break; break;
case ABOOK_CHECK_TASK_IMAGE: case ABookCommConstants.ABOOK_CHECK_TASK_IMAGE:
if (mUploadMessage == null) { if (mUploadMessage == null) {
return; return;
} }
...@@ -3865,7 +3875,7 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -3865,7 +3875,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107); ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107);
} }
break; break;
case ABOOK_CHECK_TASK_VIDEO: case ABookCommConstants.ABOOK_CHECK_TASK_VIDEO:
if (mUploadMessage == null) { if (mUploadMessage == null) {
return; return;
} }
......
...@@ -32,6 +32,7 @@ import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType; ...@@ -32,6 +32,7 @@ import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
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;
...@@ -42,6 +43,7 @@ import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification; ...@@ -42,6 +43,7 @@ import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
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.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;
...@@ -49,6 +51,8 @@ import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; ...@@ -49,6 +51,8 @@ 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.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.StringUtil;
//TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約 //TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約
public class HTMLWebViewActivity extends ParentWebViewActivity { public class HTMLWebViewActivity extends ParentWebViewActivity {
...@@ -219,10 +223,10 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -219,10 +223,10 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
FileChooserParams fileChooserParams) { FileChooserParams fileChooserParams) {
boolean result = false; boolean result = false;
if (fileChooserParams.getAcceptTypes()[0].toLowerCase().indexOf(ABookKeys.IMAGE) != -1) { if (fileChooserParams.getAcceptTypes()[0].toLowerCase().indexOf(ABookKeys.IMAGE) != -1) {
result = startCameraIntent(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().indexOf(ABookKeys.VIDEO) != -1) { } else if (fileChooserParams.getAcceptTypes()[0].toLowerCase().indexOf(ABookKeys.VIDEO) != -1) {
result = startCameraIntent(ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true); result = startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
} }
if (result) { if (result) {
...@@ -683,8 +687,18 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -683,8 +687,18 @@ 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 (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) {
finishActivity();
goChatRoom(intent, this.getClass().getName());
}
return;
}
Uri[] result = null; Uri[] result = null;
Uri dataUri = null; Uri dataUri = null;
if (intent != null && resultCode == RESULT_OK) { if (intent != null && resultCode == RESULT_OK) {
...@@ -695,7 +709,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -695,7 +709,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
} }
} }
if (requestCode == ABOOK_CHECK_TASK_IMAGE) { if (requestCode == ABookCommConstants.ABOOK_CHECK_TASK_IMAGE) {
if (mUploadMessage == null) { if (mUploadMessage == null) {
return; return;
} }
...@@ -715,12 +729,12 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -715,12 +729,12 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
mUploadMessage.onReceiveValue(null); mUploadMessage.onReceiveValue(null);
ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107); ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107);
} }
} else if (requestCode == ABOOK_CHECK_TASK_VIDEO) { } else if (requestCode == ABookCommConstants.ABOOK_CHECK_TASK_VIDEO) {
if (mUploadMessage == null) { if (mUploadMessage == null) {
return; return;
} }
mUploadMessage.onReceiveValue(result); mUploadMessage.onReceiveValue(result);
} else if (requestCode == ABOOK_CHECK_SELECT_SCENE) { } else if (requestCode == ABookCommConstants.ABOOK_CHECK_SELECT_SCENE) {
if (intent != null && result != null) { if (intent != null && result != null) {
confirmEntrySceneDialog(result[0]); confirmEntrySceneDialog(result[0]);
} }
......
...@@ -257,7 +257,6 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -257,7 +257,6 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
ActivityHandlingHelper.getInstance().finishAllLinkContentViewActivity(); ActivityHandlingHelper.getInstance().finishAllLinkContentViewActivity();
} else { } else {
ActivityHandlingHelper.getInstance().finishAllContentViewActivity(); ActivityHandlingHelper.getInstance().finishAllContentViewActivity();
} }
} }
} }
......
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