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
66352a60
Commit
66352a60
authored
Jul 15, 2021
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ActivityからDataクラスを分離した。
parent
0cd2a8de
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
38 deletions
+39
-38
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
+9
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/data/ChatData.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/view/ChatWebView.java
+30
-38
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
View file @
66352a60
...
...
@@ -93,6 +93,15 @@ public interface ABookCommConstants {
String
FILE
=
"file"
;
String
COLLABORATION
=
"collaboration"
;
}
String
SHOP_NAME
=
"shopName"
;
String
LANGUAGE_CODE
=
"languageCode"
;
String
SID
=
"sid"
;
String
ROOM_ID_UPPERCASE_D
=
"roomID"
;
String
CHAT_URL
=
"chatURL"
;
String
CMS_URL
=
"cmsURL"
;
String
IS_ONLINE
=
"isOnline"
;
String
IS_MOBILE
=
"isMobile"
;
String
PLATFORM
=
"platform"
;
}
interface
FLAG
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/data/ChatData.java
0 → 100644
View file @
66352a60
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
View file @
66352a60
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/view/ChatWebView.java
View file @
66352a60
...
...
@@ -13,26 +13,25 @@ import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import
jp.agentec.abook.abv.bl.common.exception.AcmsException
;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.CommunicationLogic
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.data.ChatData
;
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.ActivityHandlingHelper
;
public
class
ChatWebView
extends
WebView
{
private
Context
context
;
private
CommunicationLogic
communicationLogic
;
private
CommunicationLogic
communicationLogic
=
AbstractLogic
.
getLogic
(
CommunicationLogic
.
class
);
private
ChatWebViewActivity
chatActivity
;
private
ChatData
chatData
;
public
ChatWebView
(
Context
context
)
{
super
(
context
);
this
.
context
=
context
;
chatActivity
=
(
ChatWebViewActivity
)
context
;
}
public
void
init
()
{
public
void
init
(
ChatData
chatData
)
{
setOverScrollMode
(
View
.
OVER_SCROLL_NEVER
);
//オーバースクロールしない。
setVerticalScrollBarEnabled
(
false
);
//スクロールバーを消す。
addJavascriptInterface
(
this
,
"android"
);
...
...
@@ -54,19 +53,14 @@ public class ChatWebView extends WebView {
if
(
Logger
.
isDebugEnabled
())
{
setWebContentsDebuggingEnabled
(
true
);
//デバッグモード(chromeからinspect可)
}
}
public
void
setCommunicationLogic
(
CommunicationLogic
communicationLogic
){
this
.
communicationLogic
=
communicationLogic
;
this
.
chatData
=
chatData
;
}
@JavascriptInterface
public
void
saveVisitRoomInfo
(
String
roomId
,
String
roomName
)
{
// 最後のチャットのルーム名
PreferenceUtil
.
putUserPref
(
context
,
AppDefType
.
UserPrefKey
.
CHAT_LAST_ROOMNAME
,
roomName
);
// 最後のチャットのルーム
PreferenceUtil
.
putUserPref
(
context
,
AppDefType
.
UserPrefKey
.
CHAT_LAST_ROOMID
,
roomId
);
chatActivity
.
saveVisitRoomInfo
(
roomId
,
roomName
);
}
@JavascriptInterface
public
void
getLoginParameter
()
{
post
(
new
Runnable
()
{
...
...
@@ -145,8 +139,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
String
getRoomList
(
String
roomType
,
String
keyword
)
{
String
chatRoomListStr
=
communicationLogic
.
getChatRoomList
(
Integer
.
parseInt
(
roomType
),
keyword
);
return
chatRoomListStr
;
return
communicationLogic
.
getChatRoomList
(
Integer
.
parseInt
(
roomType
),
keyword
);
}
@JavascriptInterface
...
...
@@ -157,7 +150,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
void
updateRoomList
()
throws
NetworkDisconnectedException
,
AcmsException
{
chat
Activity
.
updateRoomList
();
chat
Data
.
updateRoomList
();
}
@JavascriptInterface
...
...
@@ -336,7 +329,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
void
updateArchiveList
()
throws
NetworkDisconnectedException
,
AcmsException
{
chat
Activity
.
updateArchiveList
();
chat
Data
.
updateArchiveList
();
}
@JavascriptInterface
...
...
@@ -366,7 +359,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
void
updateArchiveDetail
(
String
archiveId
)
throws
NetworkDisconnectedException
,
AcmsException
{
chat
Activity
.
updateArchiveDetail
(
archiveId
);
chat
Data
.
updateArchiveDetail
(
archiveId
);
}
@JavascriptInterface
...
...
@@ -376,12 +369,12 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
void
joinChangedCollaboration
(
String
collaborationType
,
String
meetingId
)
throws
NetworkDisconnectedException
,
AcmsException
{
chat
Activity
.
joinChangedCollaboration
(
collaborationType
,
meetingId
);
chat
Data
.
joinChangedCollaboration
(
collaborationType
,
meetingId
);
}
@JavascriptInterface
public
void
inviteCollaboration
(
String
inviteUserIds
,
String
collaborationType
)
throws
NetworkDisconnectedException
,
AcmsException
{
chat
Activity
.
inviteCollaboration
(
inviteUserIds
,
collaborationType
);
chat
Data
.
inviteCollaboration
(
inviteUserIds
,
collaborationType
);
}
@JavascriptInterface
...
...
@@ -391,32 +384,32 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
void
finishCollaboration
()
throws
NetworkDisconnectedException
,
AcmsException
{
chat
Activity
.
finishCollaboration
();
chat
Data
.
finishCollaboration
();
}
@JavascriptInterface
public
void
finishAllCollaboration
()
throws
NetworkDisconnectedException
,
AcmsException
{
chat
Activity
.
finishAllCollaboration
();
chat
Data
.
finishAllCollaboration
();
}
@JavascriptInterface
public
String
getCollaborationJoinFlg
()
{
return
chat
Activity
.
getCollaborationJoinFlg
();
return
chat
Data
.
getCollaborationJoinFlg
();
}
@JavascriptInterface
public
String
getCollaborationType
()
{
return
chat
Activity
.
getStrCollaborationType
();
return
chat
Data
.
getStrCollaborationType
();
}
@JavascriptInterface
public
String
getToMoveGroupId
()
{
return
chat
Activity
.
getToMoveGroupId
();
return
chat
Data
.
getToMoveGroupId
();
}
@JavascriptInterface
public
void
setToMoveGroupId
(
String
moveToGroupId
)
{
chat
Activity
.
setToMoveGroupId
(
moveToGroupId
);
chat
Data
.
setToMoveGroupId
(
moveToGroupId
);
}
@JavascriptInterface
...
...
@@ -472,7 +465,7 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
void
changeCollaboration
(
int
changeCollaborationType
,
int
meetingId
)
throws
NetworkDisconnectedException
,
AcmsException
{
chat
Activity
.
changeCollaboration
(
changeCollaborationType
,
meetingId
);
chat
Data
.
changeCollaboration
(
changeCollaborationType
,
meetingId
);
}
@JavascriptInterface
...
...
@@ -490,12 +483,12 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
void
setHostRequestFlg
(
int
hostRequestFlg
)
{
chat
Activity
.
setHostRequestFlg
(
hostRequestFlg
);
chat
Data
.
setHostRequestFlg
(
hostRequestFlg
);
}
@JavascriptInterface
public
int
getHostRequestFlg
()
{
return
chat
Activity
.
getHostRequestFlg
();
return
chat
Data
.
getHostRequestFlg
();
}
@JavascriptInterface
...
...
@@ -515,33 +508,32 @@ public class ChatWebView extends WebView {
@JavascriptInterface
public
void
updatePreMessage
(
String
messageId
)
throws
NetworkDisconnectedException
,
AcmsException
{
chat
Activity
.
updatePreMessage
(
messageId
);
chat
Data
.
updatePreMessage
(
messageId
);
}
@JavascriptInterface
public
String
getMessageListFromMessageId
(
String
messageId
)
{
return
chat
Activity
.
getMessageListFromMessageId
(
messageId
);
return
chat
Data
.
getMessageListFromMessageId
(
messageId
);
}
@JavascriptInterface
public
boolean
getDeviceInfo
()
{
return
true
;
public
String
getDeviceInfo
()
{
return
chatData
.
getDeviceInfo
()
;
}
@JavascriptInterface
public
String
getServerInfo
()
{
String
json
=
"{\"chatURL\":\"hoge\", \"cmsURL\":\"fuga\", \"isOnline\": true }"
;
return
json
;
return
chatData
.
getServerInfo
();
}
@JavascriptInterface
public
String
getMyUserInfo
()
{
return
"hogehoge"
;
return
chatData
.
getMyUserInfo
()
;
}
@JavascriptInterface
public
String
getRoomInfo
()
{
return
"fugafuga"
;
return
chatData
.
getRoomInfo
()
;
}
public
void
loadChatViewUrl
(
final
String
urlString
)
{
...
...
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