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
dd69043a
Commit
dd69043a
authored
Aug 26, 2021
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MRで指摘されたソースを修正した。
parent
d901cb70
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
28 additions
and
62 deletions
+28
-62
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/push/ABVFcmListenerService.java
+4
-35
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
+6
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
+2
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
+7
-9
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
+2
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
+2
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/NoPdfViewActivity.java
+2
-2
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/push/ABVFcmListenerService.java
View file @
dd69043a
...
...
@@ -110,31 +110,9 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
}
}
/*
private void showCollaborationPopUpMessage(
Long roomId,
String roomName,
String roomType,
String pushSendLoginId,
long pushSendDate,
String collaborationType)
{
Intent pushMsgDialog = new Intent(ABVFcmListenerService.this, ShowPushMessageDailogActivity.class);
String collaobrationInvitedMessage = getString(R.string.msg_invite_collaboration);
pushMsgDialog.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, collaobrationInvitedMessage);
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.collaborationType, collaborationType);
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
startActivity(pushMsgDialog);
}
*/
/**
* プッシュメッセージをダイアログ表示する
* @param messageMap 受信したメッセージを格納したMapオブジェクト
*/
private
void
showChatRoomPopupMessage
(
Map
<
String
,
String
>
messageMap
)
{
String
messageBody
=
messageMap
.
get
(
AppDefType
.
PushMessageKey
.
message
);
...
...
@@ -161,12 +139,12 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
currentActivity
.
getClass
().
equals
(
ImageViewActivity
.
class
)
||
currentActivity
.
getClass
().
equals
(
VideoViewActivity
.
class
)
){
// 呼び出し元のActivity
名を保存しておく
// 呼び出し元のActivity
の名前をmessageMapに追加する
messageMap
.
put
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
,
fromClassName
);
messageMap
.
put
(
AppDefType
.
ChatPushMessageKey
.
isNewVersio
n
,
"true"
);
messageMap
.
put
(
AppDefType
.
ChatPushMessageKey
.
needsDisplayOperationOrOperationRelatedContentScree
n
,
"true"
);
((
ABVAuthenticatedActivity
)
currentActivity
).
showChatRoomPopupMessage
((
Context
)
currentActivity
,
messageMap
);
}
else
{
//
既存
の処理
//
それ以外のActivityの場合
の処理
Intent
pushMsgDialog
=
new
Intent
(
ABVFcmListenerService
.
this
,
ShowPushMessageDailogActivity
.
class
);
pushMsgDialog
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
pushMsgDialog
.
putExtra
(
AppDefType
.
PushMessageKey
.
message
,
getContentText
(
json
.
getMessage
()));
...
...
@@ -326,13 +304,4 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
}
return
textMessage
;
}
/**
* プッシュメッセージからJSONObjectを作成する。
* @param jsonText 受信したプッシュメッセージをJSONObjectにする。
* @return
*/
private
JSONObject
createMessageJsonObject
(
String
jsonText
)
{
return
new
JSONObject
(
jsonText
);
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
View file @
dd69043a
...
...
@@ -163,7 +163,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// 遷移元のアクティビティ名
// PushMessage受信時に直接ChatRoomへ行かずに、ひとつまえのActivityに戻る為に使用する。
public
String
from
ActivityName
;
public
String
base
ActivityName
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -1243,7 +1243,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
}
/**
* ッシュメッセージがあるので、チャットルームに遷移する。
*
プ
ッシュメッセージがあるので、チャットルームに遷移する。
*/
public
boolean
goChatRoom
(
final
Intent
intent
,
final
String
nextActivityName
,
final
String
fromActivityName
)
{
if
(!
StringUtil
.
isNullOrEmpty
(
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
))
&&
...
...
@@ -1284,11 +1284,10 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
*/
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
);
PushMessageJSON
json
=
new
PushMessageJSON
(
messageBody
);
// 協業
String
messageText
=
json
.
getMessage
();
...
...
@@ -1308,11 +1307,11 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
,
json
.
getCollaborationType
());
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
,
messageMap
.
get
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
));
String
newVersion
=
messageMap
.
get
(
AppDefType
.
ChatPushMessageKey
.
isNewVersio
n
);
String
newVersion
=
messageMap
.
get
(
AppDefType
.
ChatPushMessageKey
.
needsDisplayOperationOrOperationRelatedContentScree
n
);
if
(
newVersion
!=
null
&&
newVersion
.
equals
(
new
String
(
"true"
)))
{
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
isNewVersio
n
,
true
);
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
needsDisplayOperationOrOperationRelatedContentScree
n
,
true
);
}
else
{
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
isNewVersio
n
,
false
);
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
needsDisplayOperationOrOperationRelatedContentScree
n
,
false
);
}
startActivityForResult
(
pushMsgDialog
,
ABookCommConstants
.
PUSH_MESSAGE_DLG_REQUEST_CODE
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
dd69043a
...
...
@@ -160,7 +160,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
mOperationId
=
intent
.
getLongExtra
(
ABookKeys
.
OPERATION_ID
,
-
1
);
// 遷移元のActivity
from
ActivityName
=
getIntent
().
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
);
base
ActivityName
=
getIntent
().
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
);
if
(!
isLinkedContent
)
{
operationDto
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
).
getOperation
(
mOperationId
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
View file @
dd69043a
...
...
@@ -125,7 +125,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
isCollabration
=
MeetingManager
.
getInstance
().
isCollaboration
();
Bundle
extras
=
getIntent
().
getExtras
();
if
(
extras
!=
null
&&
!
isMeetingRoomConnected
)
{
boolean
isNewVersion
=
extras
.
getBoolean
(
AppDefType
.
ChatPushMessageKey
.
isNewVersio
n
);
boolean
isNewVersion
=
extras
.
getBoolean
(
AppDefType
.
ChatPushMessageKey
.
needsDisplayOperationOrOperationRelatedContentScree
n
);
if
(
isNewVersion
)
{
setResult
(
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
,
getIntent
());
finish
();
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
View file @
dd69043a
...
...
@@ -148,6 +148,6 @@ public interface AppDefType {
String
shopName
=
"shopName"
;
String
loginId
=
"loginId"
;
String
fromActivityName
=
"fromActivityName"
;
String
isNewVersion
=
"isNewVersio
n"
;
String
needsDisplayOperationOrOperationRelatedContentScreen
=
"needsDisplayOperationOrOperationRelatedContentScree
n"
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
View file @
dd69043a
...
...
@@ -168,7 +168,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
chatData
.
setIsMobile
(!
isNormalSize
());
// どのアクティビティから遷移してきたか保存
from
ActivityName
=
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
);
base
ActivityName
=
intent
.
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
);
}
private
void
setupChatWebView
()
{
...
...
@@ -788,7 +788,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
// 戻るの作業一覧か、関連資料のどちらかのActivityのみ
Intent
intent
=
new
Intent
();
if
(
OperationListActivity
.
class
.
getName
().
equals
(
from
ActivityName
))
{
if
(
OperationListActivity
.
class
.
getName
().
equals
(
base
ActivityName
))
{
intent
.
setClass
(
ChatWebViewActivity
.
this
,
OperationListActivity
.
class
);
}
else
{
intent
.
setClass
(
ChatWebViewActivity
.
this
,
OperationRelatedContentActivity
.
class
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
View file @
dd69043a
...
...
@@ -1632,7 +1632,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
//プシュメッセージ一覧からチャットに入る
public
void
startChatWebViewActivityWithPushMessage
(
PushMessageDto
dto
)
{
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/"
);
...
...
@@ -1654,7 +1653,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
//チャットに入る
public
void
startChatWebViewActivity
()
{
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
;
...
...
@@ -1670,11 +1668,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
/**
* プシュメッセージからチャットに遷移する
* @param roomId
* @param roomName
* @param roomId chatRoom の Id
* @param roomName chatRoom の名前
* @param targetActivityName 直接chatRoom に遷移する場合は、ChatWebViewActivity名。chatRoomに遷移する前に、別のActivityを経由する場合は、そのActivity名
* @param fromActivityName この関数を呼び出したActivity名
*/
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
;
public
void
startChatWebViewActivity
(
Long
roomId
,
String
roomName
,
String
targetActivityName
,
String
fromActivityName
)
{
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
"chatWebviewUrl"
,
ABVEnvironment
.
getInstance
().
acmsAddress
+
ABVDataCache
.
getInstance
().
getUrlPath
()
+
"/chatapi/chat/"
);
String
sid
=
ABVDataCache
.
getInstance
().
getMemberInfo
().
sid
;
...
...
@@ -1686,7 +1685,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomId
,
roomId
);
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
,
roomName
);
intent
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
fromActivityName
,
fromActivityName
);
intent
.
setClassName
(
mContext
.
getPackageName
(),
nex
tActivityName
);
intent
.
setClassName
(
mContext
.
getPackageName
(),
targe
tActivityName
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
getCurrentActivity
().
startActivity
(
intent
);
}
...
...
@@ -1924,9 +1923,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param roomType
*/
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/"
);
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
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
View file @
dd69043a
...
...
@@ -3828,9 +3828,9 @@ public class ContentViewActivity extends ABVContentViewActivity {
if
(
requestCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_REQUEST_CODE
)
{
// プッシュメッセージダイアログのリザルトだった場合
if
(
resultCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
&&
!
StringUtil
.
isNullOrEmpty
(
from
ActivityName
))
{
if
(
resultCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
&&
!
StringUtil
.
isNullOrEmpty
(
base
ActivityName
))
{
finishActivity
();
goChatRoom
(
intent
,
from
ActivityName
,
ContentViewActivity
.
class
.
getName
());
goChatRoom
(
intent
,
base
ActivityName
,
ContentViewActivity
.
class
.
getName
());
}
return
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
View file @
dd69043a
...
...
@@ -690,9 +690,9 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
if
(
requestCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_REQUEST_CODE
)
{
// プッシュメッセージダイアログのリザルトだった場合
if
(
resultCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
&&
!
StringUtil
.
isNullOrEmpty
(
from
ActivityName
))
{
if
(
resultCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
&&
!
StringUtil
.
isNullOrEmpty
(
base
ActivityName
))
{
finishActivity
();
goChatRoom
(
intent
,
from
ActivityName
,
HTMLWebViewActivity
.
class
.
getName
());
goChatRoom
(
intent
,
base
ActivityName
,
HTMLWebViewActivity
.
class
.
getName
());
}
return
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/NoPdfViewActivity.java
View file @
dd69043a
...
...
@@ -215,9 +215,9 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
if
(
requestCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_REQUEST_CODE
)
{
// プッシュメッセージダイアログのリザルトだった場合
if
(
resultCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
&&
!
StringUtil
.
isNullOrEmpty
(
from
ActivityName
))
{
if
(
resultCode
==
ABookCommConstants
.
PUSH_MESSAGE_DLG_RESULT
.
OK
&&
!
StringUtil
.
isNullOrEmpty
(
base
ActivityName
))
{
finishActivity
();
goChatRoom
(
intent
,
from
ActivityName
,
getClass
().
getName
());
goChatRoom
(
intent
,
base
ActivityName
,
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