Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
8651e4f7
Commit
8651e4f7
authored
Aug 26, 2021
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
プッシュメッセージからチャットと協業に遷移する時、iOSと同じ遷移にした。(2)
parent
1bb4f6ed
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
97 additions
and
155 deletions
+97
-155
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/push/ABVFcmListenerService.java
+10
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
+16
-88
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+3
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
+2
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
+16
-8
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
+2
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
+10
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+7
-12
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationRelatedContentActivity.java
+3
-5
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
+5
-16
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
+3
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
+3
-6
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/NoPdfViewActivity.java
+17
-4
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/push/ABVFcmListenerService.java
View file @
8651e4f7
...
...
@@ -37,6 +37,8 @@ import jp.agentec.abook.abv.ui.home.activity.SplashScreenActivity;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.VideoViewActivity
;
import
jp.agentec.adf.util.StringUtil
;
public
class
ABVFcmListenerService
extends
FirebaseMessagingService
{
...
...
@@ -155,22 +157,27 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
if
(
currentActivity
.
getClass
().
equals
(
HTMLWebViewActivity
.
class
)
||
currentActivity
.
getClass
().
equals
(
ContentViewActivity
.
class
)
||
currentActivity
.
getClass
().
equals
(
OperationRelatedContentActivity
.
class
)
||
currentActivity
.
getClass
().
equals
(
OperationListActivity
.
class
)
currentActivity
.
getClass
().
equals
(
OperationListActivity
.
class
)
||
currentActivity
.
getClass
().
equals
(
ImageViewActivity
.
class
)
||
currentActivity
.
getClass
().
equals
(
VideoViewActivity
.
class
)
){
// 呼び出し元のActivity名を保存しておく
messageMap
.
put
(
AppDefType
.
ChatPushMessageKey
.
fromClassName
,
fromClassName
);
messageMap
.
put
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
,
fromClassName
);
messageMap
.
put
(
AppDefType
.
ChatPushMessageKey
.
isNewVersion
,
"true"
);
((
ABVAuthenticatedActivity
)
currentActivity
).
showChatRoomPopupMessage
((
Context
)
currentActivity
,
messageMap
);
}
else
{
// 既存の処理
Intent
pushMsgDialog
=
new
Intent
(
ABVFcmListenerService
.
this
,
ShowPushMessageDailogActivity
.
class
);
pushMsgDialog
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
pushMsgDialog
.
putExtra
(
AppDefType
.
PushMessageKey
.
message
,
json
.
getMessage
(
));
pushMsgDialog
.
putExtra
(
AppDefType
.
PushMessageKey
.
message
,
getContentText
(
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
.
roomType
,
json
.
getRoomType
());
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
,
json
.
getCollaborationType
());
startActivity
(
pushMsgDialog
);
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
View file @
8651e4f7
...
...
@@ -161,12 +161,9 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
int
PAYMENT
=
3
;
}
// ABookCommunicationでチャットの情報を格納しておく
//private Long roomId = new Long(0);
//private String roomName = "";
//private String collaborationType = "";
//private String roomType = "";
//private String fromClassName = "";
// 遷移元のアクティビティ名
// PushMessage受信時に直接ChatRoomへ行かずに、ひとつまえのActivityに戻る為に使用する。
public
String
fromActivityName
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -1246,79 +1243,15 @@ 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(
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
boolean
goChatRoom
(
final
Intent
intent
,
final
String
nextActivity
)
{
public
boolean
goChatRoom
(
final
Intent
intent
,
final
String
nextActivity
Name
,
final
String
fromActivityName
)
{
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 = "
+
nextActivity
);
if
(!
StringUtil
.
isNullOrEmpty
(
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
roomType
))
&&
!
StringUtil
.
isNullOrEmpty
(
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
))
)
{
...
...
@@ -1328,12 +1261,14 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
),
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
),
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
roomType
),
nextActivity
);
nextActivityName
,
fromActivityName
);
}
else
{
ActivityHandlingHelper
.
getInstance
().
startChatWebViewActivity
(
intent
.
getLongExtra
(
AppDefType
.
ChatPushMessageKey
.
roomId
,
'0'
),
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
),
nextActivity
);
nextActivityName
,
fromActivityName
);
}
}
},
500
);
...
...
@@ -1355,13 +1290,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
}
json
=
new
PushMessageJSON
(
messageBody
);
/**
String textMessage = json.getMessage();
if (textMessage.contains(ABookCommConstants.INVITE_COLLABORATION)) {
// 協業
textMessage = getString(R.string.msg_invite_collaboration);
}
*/
// 協業
String
messageText
=
json
.
getMessage
();
if
(
json
.
isCollaboration
())
{
...
...
@@ -1379,14 +1307,14 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomType
,
json
.
getRoomType
());
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
,
json
.
getCollaborationType
());
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
from
ClassName
,
messageMap
.
get
(
AppDefType
.
ChatPushMessageKey
.
fromClass
Name
));
/**
this.roomId = roomID;
this.roomName = roomName
;
this.collaborationType = collaborationType;
this.roomType = roomType
;
this.fromClassName = fromClassName;
*/
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
from
ActivityName
,
messageMap
.
get
(
AppDefType
.
ChatPushMessageKey
.
fromActivity
Name
));
String
newVersion
=
messageMap
.
get
(
AppDefType
.
ChatPushMessageKey
.
isNewVersion
);
if
(
newVersion
!=
null
&&
newVersion
.
equals
(
new
String
(
"true"
)))
{
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
isNewVersion
,
true
)
;
}
else
{
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
isNewVersion
,
false
)
;
}
startActivityForResult
(
pushMsgDialog
,
ABookCommConstants
.
PUSH_MESSAGE_DLG_REQUEST_CODE
);
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
8651e4f7
...
...
@@ -17,7 +17,6 @@ import android.view.View;
import
android.view.ViewGroup
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.Button
;
import
android.widget.ImageButton
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
...
...
@@ -71,7 +70,6 @@ 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.PatternStringUtil
;
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.ABookPermissionHelper
;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
...
...
@@ -161,6 +159,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
isLinkedContent
=
intent
.
getBooleanExtra
(
"isLinkedContent"
,
false
);
mOperationId
=
intent
.
getLongExtra
(
ABookKeys
.
OPERATION_ID
,
-
1
);
// 遷移元のActivity
fromActivityName
=
getIntent
().
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
);
if
(!
isLinkedContent
)
{
operationDto
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
).
getOperation
(
mOperationId
);
mXWalkOpenType
=
intent
.
getIntExtra
(
Constant
.
ABookCheck
.
XWALK_OPEN_TYPE
,
Constant
.
XWalkOpenType
.
DEFAULT
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
View file @
8651e4f7
...
...
@@ -389,8 +389,8 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
if
(
extras
!=
null
&&
!
StringUtil
.
isNullOrEmpty
(
extras
.
getString
(
AppDefType
.
ChatPushMessageKey
.
roomName
)))
{
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomId
,
extras
.
getLong
(
AppDefType
.
ChatPushMessageKey
.
roomId
));
// Room Id
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
,
extras
.
getString
(
AppDefType
.
ChatPushMessageKey
.
roomName
));
// Room Name
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
pushSendLoginId
,
extras
.
get
Lo
ng
(
AppDefType
.
ChatPushMessageKey
.
pushSendLoginId
));
// sendLoginId
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
pushSendDate
,
extras
.
get
Stri
ng
(
AppDefType
.
ChatPushMessageKey
.
pushSendDate
));
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
pushSendLoginId
,
extras
.
get
Stri
ng
(
AppDefType
.
ChatPushMessageKey
.
pushSendLoginId
));
// sendLoginId
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
pushSendDate
,
extras
.
get
Lo
ng
(
AppDefType
.
ChatPushMessageKey
.
pushSendDate
));
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomType
,
extras
.
getString
(
AppDefType
.
ChatPushMessageKey
.
roomType
));
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
,
extras
.
getString
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
));
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
View file @
8651e4f7
...
...
@@ -16,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.util.AlertDialogUtil
;
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.helper.ActivityHandlingHelper
;
import
jp.agentec.adf.util.StringUtil
;
...
...
@@ -124,8 +125,13 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
isCollabration
=
MeetingManager
.
getInstance
().
isCollaboration
();
Bundle
extras
=
getIntent
().
getExtras
();
if
(
extras
!=
null
&&
!
isMeetingRoomConnected
)
{
setResult
(
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
,
getIntent
());
finish
();
boolean
isNewVersion
=
extras
.
getBoolean
(
AppDefType
.
ChatPushMessageKey
.
isNewVersion
);
if
(
isNewVersion
)
{
setResult
(
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
,
getIntent
());
finish
();
}
else
{
moveChatRoom
(
extras
);
}
}
if
(
isMeetingRoomConnected
||
isCollabration
)
{
showCannotMoveChatRoomDialog
();
...
...
@@ -149,23 +155,24 @@ 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);
ActivityHandlingHelper
.
getInstance
().
startChatWebViewActivity
(
roomId
,
roomName
,
ChatWebViewActivity
.
class
.
getName
(),
""
);
}
else
{
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType, roomType);
ActivityHandlingHelper
.
getInstance
().
startChatWebViewActivityWithCollaboration
(
roomId
,
roomName
,
collaborationType
,
roomType
,
ChatWebViewActivity
.
class
.
getName
(),
""
);
}
}
}
*/
/**
* 遠隔支援中(会議室接続中)はチャットルームにはいけない。
...
...
@@ -186,6 +193,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
alertDialog
.
setPositiveButton
(
R
.
string
.
ok
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
setResult
(
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
CANCEL
,
getIntent
());
finish
();
}
});
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
View file @
8651e4f7
...
...
@@ -147,6 +147,7 @@ public interface AppDefType {
String
roomType
=
"roomType"
;
String
shopName
=
"shopName"
;
String
loginId
=
"loginId"
;
String
fromClassName
=
"fromClassName"
;
String
fromActivityName
=
"fromActivityName"
;
String
isNewVersion
=
"isNewVersion"
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
View file @
8651e4f7
...
...
@@ -166,6 +166,9 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
chatData
.
setIsOnline
(
false
);
chatData
.
setContext
(
ChatWebViewActivity
.
this
);
chatData
.
setIsMobile
(!
isNormalSize
());
// どのアクティビティから遷移してきたか保存
fromActivityName
=
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
);
}
private
void
setupChatWebView
()
{
...
...
@@ -782,8 +785,14 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
mChatWebView
.
leaveRoom
();
exitAndDeleteMeetingRoom
();
finish
();
// 戻るの作業一覧か、関連資料のどちらかのActivityのみ
Intent
intent
=
new
Intent
();
intent
.
setClass
(
ChatWebViewActivity
.
this
,
OperationListActivity
.
class
);
if
(
OperationListActivity
.
class
.
getName
().
equals
(
fromActivityName
))
{
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
);
startActivity
(
intent
,
NaviConsts
.
Left
);
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
8651e4f7
...
...
@@ -5,12 +5,9 @@ import android.app.Dialog;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.res.Configuration
;
import
android.database.Cursor
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.provider.MediaStore
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.View
;
...
...
@@ -24,8 +21,6 @@ import android.widget.EditText;
import
android.widget.FrameLayout
;
import
android.widget.GridView
;
import
android.widget.ImageButton
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.ListView
;
import
android.widget.RadioGroup
;
import
android.widget.TextView
;
...
...
@@ -37,10 +32,7 @@ import net.lingala.zip4j.exception.ZipException;
import
org.json.adf.JSONObject
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
...
...
@@ -517,7 +509,7 @@ public class OperationListActivity extends ABVUIActivity {
refreshOperationList
();
// プッシュメッセージがある場合の処理
if
(
goChatRoom
(
getIntent
(),
ChatWebViewActivity
.
class
.
getName
()))
{
if
(
goChatRoom
(
getIntent
(),
ChatWebViewActivity
.
class
.
getName
()
,
OperationListActivity
.
class
.
getName
()
))
{
return
;
}
...
...
@@ -794,6 +786,7 @@ public class OperationListActivity extends ABVUIActivity {
intent
.
putExtra
(
ABookKeys
.
OPERATION_ID
,
operationDto
.
operationId
);
intent
.
putExtra
(
Constant
.
ABookCheck
.
XWALK_OPEN_TYPE
,
Constant
.
XWalkOpenType
.
TASK_REPORT
);
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
)
{
intent
.
putExtra
(
"LINKURL"
,
"file://"
+
path
);
...
...
@@ -1011,6 +1004,7 @@ public class OperationListActivity extends ABVUIActivity {
intent
.
putExtra
(
ABookKeys
.
CONTENT_ID
,
operationDto
.
contentId
);
intent
.
putExtra
(
ABookKeys
.
OPERATION_ID
,
operationDto
.
operationId
);
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
.
setClass
(
OperationListActivity
.
this
,
HTMLXWalkWebViewActivity
.
class
);
ActivityHandlingHelper
.
getInstance
().
startHTMLXWalkWebActivity
(
OperationListActivity
.
this
,
intent
,
url
,
operationDto
.
contentId
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
);
...
...
@@ -1282,10 +1276,11 @@ public class OperationListActivity extends ABVUIActivity {
@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
)
{
goChatRoom
(
intent
,
ChatWebViewActivity
.
class
.
getName
());
goChatRoom
(
intent
,
ChatWebViewActivity
.
class
.
getName
()
,
OperationListActivity
.
class
.
getName
()
);
}
return
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationRelatedContentActivity.java
View file @
8651e4f7
...
...
@@ -11,7 +11,6 @@ import android.view.Display;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.ImageButton
;
import
android.widget.LinearLayout
;
...
...
@@ -21,7 +20,6 @@ import android.widget.Toast;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Stack
;
import
jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON
;
import
jp.agentec.abook.abv.bl.acms.type.AcmsApis
;
...
...
@@ -37,7 +35,6 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.bl.websocket.MeetingManager
;
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.ABVUIActivity
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorCode
;
...
...
@@ -290,6 +287,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
}
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
,
OperationRelatedContentActivity
.
class
.
getName
());
ActivityHandlingHelper
.
getInstance
().
checkContentActivity
(
contentId
,
0
,
intent
);
}
}
catch
(
Exception
e
)
{
...
...
@@ -545,7 +543,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
updateCollaborationInfo
();
refreshCollaborationUI
();
super
.
onResume
();
if
(
goChatRoom
(
getIntent
(),
ChatWebViewActivity
.
class
.
getName
()))
{
if
(
goChatRoom
(
getIntent
(),
ChatWebViewActivity
.
class
.
getName
()
,
OperationRelatedContentActivity
.
class
.
getName
()
))
{
return
;
}
showOperationRelatedContentList
();
...
...
@@ -606,7 +604,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
if
(
requestCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_REQUEST_CODE
)
{
if
(
resultCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
)
{
finish
();
goChatRoom
(
intent
,
ChatWebViewActivity
.
class
.
getName
());
goChatRoom
(
intent
,
ChatWebViewActivity
.
class
.
getName
()
,
getClass
().
getName
()
);
}
return
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
View file @
8651e4f7
...
...
@@ -1673,7 +1673,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param roomId
* @param roomName
*/
public
void
startChatWebViewActivity
(
Long
roomId
,
String
roomName
,
String
nextActivityName
)
{
public
void
startChatWebViewActivity
(
Long
roomId
,
String
roomName
,
String
nextActivityName
,
String
fromActivityName
)
{
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/"
);
...
...
@@ -1685,18 +1685,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
shopName
,
shopName
);
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomId
,
roomId
);
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
,
roomName
);
//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
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
,
fromActivityName
);
intent
.
setClassName
(
mContext
.
getPackageName
(),
nextActivityName
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
getCurrentActivity
().
startActivity
(
intent
);
...
...
@@ -1934,8 +1923,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param collaborationType
* @param roomType
*/
public
void
startChatWebViewActivityWithCollaboration
(
Long
roomId
,
String
roomName
,
String
collaborationType
,
String
roomType
,
String
nextActivityName
)
{
String
className
=
ChatWebViewActivity
.
class
.
getName
();
public
void
startChatWebViewActivityWithCollaboration
(
Long
roomId
,
String
roomName
,
String
collaborationType
,
String
roomType
,
String
nextActivityName
,
String
fromActivityName
)
{
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/"
);
...
...
@@ -1949,7 +1937,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomId
,
roomId
);
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
,
roomName
);
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomType
,
roomType
);
intent
.
setClassName
(
mContext
.
getPackageName
(),
className
);
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
,
fromActivityName
);
intent
.
setClassName
(
mContext
.
getPackageName
(),
nextActivityName
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
getCurrentActivity
().
startActivity
(
intent
);
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
View file @
8651e4f7
...
...
@@ -76,7 +76,6 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Stack
;
import
java.util.concurrent.ConcurrentHashMap
;
import
jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON
;
...
...
@@ -120,7 +119,6 @@ import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.launcher.android.R.id
;
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.AppColor
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
...
...
@@ -138,8 +136,6 @@ import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import
jp.agentec.abook.abv.ui.common.view.ABVEditText
;
import
jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow
;
import
jp.agentec.abook.abv.ui.common.vo.Size
;
import
jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity
;
import
jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity
;
import
jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper
;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.abook.abv.ui.Interface.MovePageInterface
;
...
...
@@ -3830,11 +3826,11 @@ public class ContentViewActivity extends ABVContentViewActivity {
Uri
[]
result
=
null
;
Uri
dataUri
=
null
;
// プッシュメッセージダイアログのリザルトだった場合
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
(
fromActivityName
))
{
finishActivity
();
goChatRoom
(
intent
,
OperationRelatedContent
Activity
.
class
.
getName
());
goChatRoom
(
intent
,
fromActivityName
,
ContentView
Activity
.
class
.
getName
());
}
return
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
View file @
8651e4f7
...
...
@@ -43,7 +43,6 @@ import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.cl.util.ContentLogUtil
;
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.ErrorMessage
;
import
jp.agentec.abook.abv.ui.common.constant.NaviConsts
;
...
...
@@ -51,8 +50,6 @@ 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.AlertDialogUtil
;
import
jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow
;
import
jp.agentec.abook.abv.ui.home.activity.OperationListActivity
;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.adf.util.StringUtil
;
//TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約
...
...
@@ -691,11 +688,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
final
Intent
intent
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
intent
);
// プッシュメッセージダイアログのリザルトだった場合
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
(
fromActivityName
))
{
finishActivity
();
goChatRoom
(
intent
,
OperationList
Activity
.
class
.
getName
());
goChatRoom
(
intent
,
fromActivityName
,
HTMLWebView
Activity
.
class
.
getName
());
}
return
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/NoPdfViewActivity.java
View file @
8651e4f7
package
jp
.
agentec
.
abook
.
abv
.
ui
.
viewer
.
activity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View.OnClickListener
;
...
...
@@ -12,17 +13,16 @@ import android.widget.ImageButton;
import
java.util.ArrayList
;
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.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.data.dao.AbstractDao
;
import
jp.agentec.abook.abv.bl.data.dao.ContentDao
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.launcher.android.R
;
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.home.helper.ActivityHandlingHelper
;
import
jp.agentec.adf.util.StringUtil
;
// TODO: later 遠隔連動関連はContentView,HTMLWebViewと共通しているので要集約
public
class
NoPdfViewActivity
extends
ABVContentViewActivity
{
...
...
@@ -38,7 +38,7 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
//タイトルバー非表示
setContentView
(
R
.
layout
.
content_common_toolbar
);
...
...
@@ -209,4 +209,17 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
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
(
fromActivityName
))
{
finishActivity
();
goChatRoom
(
intent
,
fromActivityName
,
getClass
().
getName
());
}
return
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment