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
3f6889a0
Commit
3f6889a0
authored
May 11, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/abcomm_sp6' into 'features/1.3.100'
Features/abcomm sp6 See merge request
!144
parents
dec6e8ce
e9ad4810
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
368 additions
and
45 deletions
+368
-45
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
+19
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/parameters/InviteCollaborationParameters.java
+90
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/AcmsApis.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
+1
-0
ABVJE_Launcher_Android/AndroidManifest.xml
+4
-1
ABVJE_Launcher_Android/assets/chat
+1
-1
ABVJE_Res_Default_Android/res/values-ja/strings.xml
+2
-1
ABVJE_Res_Default_Android/res/values-ko/strings.xml
+3
-0
ABVJE_Res_Default_Android/res/values/strings.xml
+2
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/push/ABVFcmListenerService.java
+16
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+8
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
+6
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
+1
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+153
-21
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
+60
-12
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
View file @
3f6889a0
...
...
@@ -71,6 +71,7 @@ import jp.agentec.abook.abv.bl.acms.client.parameters.GetMessagesParameters;
import
jp.agentec.abook.abv.bl.acms.client.parameters.GetNameCardParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.GetOperationDataParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.GetTaskFileParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.InviteCollaborationParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.InviteUsersParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.JoinCollaborationParameters
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.NewAppStoreLoginParameters
;
...
...
@@ -801,6 +802,24 @@ public class AcmsClient implements AcmsClientResponseListener {
}
/**
* 協業内ユーザー招待
*
* @param sid
* @param roomId
* @param roomName
* @param inveitedUserIds
* @param collaborationType
* @return
* @throws NetworkDisconnectedException
* @throws AcmsException
*/
public
ArchiveDetailJSON
inviteCollaboration
(
String
sid
,
Integer
roomId
,
String
roomName
,
String
inveitedUserIds
,
String
collaborationType
)
throws
NetworkDisconnectedException
,
AcmsException
{
HttpResponse
response
=
send
(
AcmsApis
.
ApigetCollaboration
,
new
InviteCollaborationParameters
(
sid
,
AcmsApis
.
CollaborationCmds
.
invite
,
roomId
,
roomName
,
inveitedUserIds
,
collaborationType
));
ArchiveDetailJSON
json
=
new
ArchiveDetailJSON
(
response
.
httpResponseBody
);
return
json
;
}
/**
* 作業報告データ送信
* @param sid
* @param operationId
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/parameters/InviteCollaborationParameters.java
0 → 100644
View file @
3f6889a0
package
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
parameters
;
import
jp.agentec.adf.net.http.HttpParameterObject
;
public
class
InviteCollaborationParameters
extends
HttpParameterObject
{
/**
* セッションID
* @since 1.0.0
*/
private
String
sid
;
private
String
cmd
;
private
Integer
roomId
;
private
String
roomName
;
private
String
inviteUserIds
;
private
String
collaborationType
;
/**
* {@link InviteCollaborationParameters} のインスタンスを初期化します。
* @param sid ログインした時のセッションIDです。
* @param cmd Apiリクエストに必要なコマンド(ABOOK COMM専用)。
* @param roomId 協業を開始したルームIDです。(ABOOK COMM専用)。
* @param roomName 協業を開始したルームNAMEです。(ABOOK COMM専用)。
* @param inviteUserIds 協業に招待されたユーザーIDです。(ABOOK COMM専用)。
* @param collaborationType 協業タイプです。(ABOOK COMM専用)。
* @since 1.0.0
*/
public
InviteCollaborationParameters
(
String
sid
,
String
cmd
,
Integer
roomId
,
String
roomName
,
String
inviteUserIds
,
String
collaborationType
)
{
this
.
sid
=
sid
;
this
.
cmd
=
cmd
;
this
.
roomId
=
roomId
;
this
.
roomName
=
roomName
;
this
.
inviteUserIds
=
inviteUserIds
;
this
.
collaborationType
=
collaborationType
;
}
/**
* セッションIDを返します。
* @return ログインした時のセッションIDです。
* @since 1.0.0
*/
public
String
getSid
()
{
return
sid
;
}
/**
* コマンドを返します。
* @return Apiリクエストに必要なコマンドです。
* @since 1.0.0
*/
public
String
getCmd
()
{
return
cmd
;
}
/**
* RoomIdを返します。
* @return 協業を開始したルームIDです。
* @since 1.0.0
*/
public
Integer
getRoomId
()
{
return
roomId
;
}
/**
* RoomNameを返します。
* @return 協業を開始したルームNAMEです。
* @since 1.0.0
*/
public
String
getRoomName
()
{
return
roomName
;
}
/**
* InviteUserIdsを返します。
* @return 協業に招待されたユーザーIDです。
* @since 1.0.0
*/
public
String
getInviteUserIds
()
{
return
inviteUserIds
;
}
/**
* collaborationTypeを返します。
* @return 協業タイプです。
* @since 1.0.0
*/
public
String
getCollaborationType
()
{
return
collaborationType
;
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/AcmsApis.java
View file @
3f6889a0
...
...
@@ -212,6 +212,7 @@ public class AcmsApis {
public
static
final
String
start
=
"1"
;
public
static
final
String
join
=
"2"
;
public
static
final
String
finish
=
"3"
;
public
static
final
String
invite
=
"4"
;
}
// download
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
View file @
3f6889a0
...
...
@@ -125,6 +125,7 @@ public interface ABookCommConstants {
interface
COLLABORATION_JOIN_FLG
{
Integer
CREATE
=
0
;
Integer
JOIN
=
1
;
Integer
INVITE
=
2
;
}
interface
ROOM_VIEW_FLAG
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
3f6889a0
...
...
@@ -189,6 +189,7 @@ public class CommunicationLogic extends AbstractLogic {
groupPathJsonArray
.
put
(
jsonObject
);
}
resultJson
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_ID
,
shopMemberDto
.
shopMemberId
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
LOGIN_ID
,
shopMemberDto
.
loginId
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_NAME
,
shopMemberDto
.
shopMemberName
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
PROFILE_URL
,
getProfileUrlPath
(
shopMemberDto
.
profileUrl
));
resultJson
.
put
(
ABookCommConstants
.
KEY
.
GROUP_PATH_LIST
,
groupPathJsonArray
);
...
...
ABVJE_Launcher_Android/AndroidManifest.xml
View file @
3f6889a0
...
...
@@ -243,7 +243,9 @@
android:theme=
"@android:style/Theme.NoTitleBar.Fullscreen"
>
</activity>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.ChatWebviewActivity"
android:configChanges=
"orientation|screenSize"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.ChatWebviewActivity"
android:configChanges=
"screenSize|smallestScreenSize|screenLayout|orientation"
android:resizeableActivity=
"true"
android:supportsPictureInPicture=
"true"
/>
</application>
</manifest>
\ No newline at end of file
chat
@
a1097bef
Subproject commit
de7a33d34ccf3a0307abe0c4bfbb0be2f233b54f
Subproject commit
a1097bef37149c535417bb3030e583ce9dd0a9c0
ABVJE_Res_Default_Android/res/values-ja/strings.xml
View file @
3f6889a0
...
...
@@ -1479,7 +1479,8 @@
<string
name=
"msg_error_chat_name_has_invalid_character"
>
特殊文字 ;/?:@
&
=+$,-_.!~*\'()#\\\"` はルーム名に含めることができません。
</string>
<string
name=
"msg_error_chat_room_sc_forbidden"
>
認証に失敗しました。再度ログインが必要です。
</string>
<string
name=
"msg_error_already_exist_same_room"
>
同じルームが既に存在します。
</string>
<string
name=
"msg_confirm_send_host_change"
>
ホスト権限を渡しますか?
</string>
<string
name=
"msg_invite_collaboration"
>
協業に招待されました。
</string>
<!-- 連続作業 -->
<string
name=
"msg_error_all_process_delete"
>
全削除の送信に失敗しました。
</string>
...
...
ABVJE_Res_Default_Android/res/values-ko/strings.xml
View file @
3f6889a0
...
...
@@ -1486,4 +1486,6 @@
<string
name=
"msg_error_chat_room_sc_forbidden"
>
사용자 정보를 확인할 수 없습니다. 다시 로그인하시기 바랍니다.
</string>
<string
name=
"msg_error_all_process_delete"
>
모두 삭제 송신에 실패하였습니다.
</string>
<string
name=
"msg_error_already_exist_same_room"
>
동일한 채팅방이 이미 존재합니다.
</string>
<string
name=
"msg_confirm_send_host_change"
>
방장 권한을 전달 받으시겠습니까?
</string>
<string
name=
"msg_invite_collaboration"
>
협업에 초대되셨습니다.
</string>
</resources>
\ No newline at end of file
ABVJE_Res_Default_Android/res/values/strings.xml
View file @
3f6889a0
...
...
@@ -1483,4 +1483,6 @@
<string
name=
"msg_error_chat_room_sc_forbidden"
>
Failed to authenticate. Please login again.
</string>
<string
name=
"msg_error_all_process_delete"
>
Failed to send all deletes.
</string>
<string
name=
"msg_error_already_exist_same_room"
>
Already exist same room.
</string>
<string
name=
"msg_confirm_send_host_change"
>
Do you want to receive host permissions?
</string>
<string
name=
"msg_invite_collaboration"
>
You are invited to collaboration.
</string>
</resources>
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/push/ABVFcmListenerService.java
View file @
3f6889a0
...
...
@@ -33,6 +33,7 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
private
static
final
String
TAG
=
"ABVFcmListenerService"
;
private
NotificationManager
mNotificationManager
;
private
static
int
mNotificationConnect
=
0
;
private
final
String
INVITE_COLLABORATION
=
"inviteCollaboration<::split>"
;
@Override
public
void
onCreate
()
{
...
...
@@ -94,6 +95,21 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
if
(
AppUtil
.
isAppForground
(
this
))
{
msg
.
put
(
AppDefType
.
PushMessageKey
.
message
,
pushMsg
);
}
if
(
pushMsg
.
contains
(
INVITE_COLLABORATION
))
{
String
[]
inviteMessage
=
pushMsg
.
split
(
"<::split>"
);
tempMsg
=
getString
(
R
.
string
.
msg_invite_collaboration
);
Intent
pushMsgDialog
=
new
Intent
(
ABVFcmListenerService
.
this
,
ShowPushMessageDailogActivity
.
class
);
pushMsgDialog
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
pushMsgDialog
.
putExtra
(
AppDefType
.
PushMessageKey
.
message
,
tempMsg
);
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomId
,
roomId
);
// Room Id
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
,
roomName
);
// Room Name
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
pushSendLoginId
,
pushSendLoginId
);
// sendLoginId
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
pushSendDate
,
pushSendDate
);
pushMsgDialog
.
putExtra
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
,
inviteMessage
[
1
]);
startActivity
(
pushMsgDialog
);
return
;
}
}
if
(
AppUtil
.
isAppForground
(
this
))
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
3f6889a0
...
...
@@ -469,13 +469,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// }
}
else
{
// 会議室退室ボタン非表示
exitMeetingBtn
.
setVisibility
(
View
.
GONE
);
RelativeLayout
.
LayoutParams
params
=
new
RelativeLayout
.
LayoutParams
(
WC
,
WC
);
params
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_RIGHT
);
params
.
addRule
(
RelativeLayout
.
CENTER_VERTICAL
);
params
.
rightMargin
=
(
int
)
(
getResources
().
getDisplayMetrics
().
density
*
5
);
subMenuBtn
.
setLayoutParams
(
params
);
if
(
exitMeetingBtn
!=
null
)
{
exitMeetingBtn
.
setVisibility
(
View
.
GONE
);
RelativeLayout
.
LayoutParams
params
=
new
RelativeLayout
.
LayoutParams
(
WC
,
WC
);
params
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_RIGHT
);
params
.
addRule
(
RelativeLayout
.
CENTER_VERTICAL
);
params
.
rightMargin
=
(
int
)
(
getResources
().
getDisplayMetrics
().
density
*
5
);
subMenuBtn
.
setLayoutParams
(
params
);
}
// if (helpButton != null && helpButton.getVisibility() == View.VISIBLE) {
// helpButton.setLayoutParams(params);
// }
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
View file @
3f6889a0
...
...
@@ -123,6 +123,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
String
roomName
=
extras
.
getString
(
AppDefType
.
ChatPushMessageKey
.
roomName
);
String
pushSendLoginId
=
extras
.
getString
(
AppDefType
.
ChatPushMessageKey
.
pushSendLoginId
);
long
pushSendDate
=
extras
.
getLong
(
AppDefType
.
ChatPushMessageKey
.
pushSendDate
);
String
collaborationType
=
extras
.
getString
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
);
if
(
roomId
>
0
&&
!
StringUtil
.
isNullOrEmpty
(
roomName
))
{
List
<
PushMessageDto
>
pushMessageDtoList
=
AbstractLogic
.
getLogic
(
PushMessageLogic
.
class
).
getAllPushMessageList
();
...
...
@@ -138,8 +139,11 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
Logger
.
d
(
"tempDate"
,
"date : "
+
tempDate
);
}
ActivityHandlingHelper
.
getInstance
().
startChatWebviewActivity
(
roomId
,
roomName
);
if
(
StringUtil
.
isNullOrEmpty
(
collaborationType
))
{
ActivityHandlingHelper
.
getInstance
().
startChatWebviewActivity
(
roomId
,
roomName
);
}
else
{
ActivityHandlingHelper
.
getInstance
().
startChatWebviewActivityWithCollaboration
(
roomId
,
roomName
,
collaborationType
);
}
}
}
finish
();
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
View file @
3f6889a0
...
...
@@ -141,5 +141,6 @@ public interface AppDefType {
String
roomName
=
"roomName"
;
String
pushSendLoginId
=
"pushSendLoginId"
;
String
pushSendDate
=
"pushSendDate"
;
String
collaborationType
=
"collaborationType"
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
3f6889a0
package
jp
.
agentec
.
abook
.
abv
.
ui
.
home
.
activity
;
import
android.annotation.SuppressLint
;
import
android.app.Activity
;
import
android.app.AlertDialog
;
import
android.app.Dialog
;
import
android.app.DownloadManager
;
import
android.app.PictureInPictureParams
;
import
android.content.BroadcastReceiver
;
import
android.content.ContentValues
;
import
android.content.Context
;
...
...
@@ -54,6 +56,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Stack
;
import
jp.agentec.abook.abv.bl.acms.client.AcmsClient
;
import
jp.agentec.abook.abv.bl.acms.client.json.ArchiveDetailJSON
;
...
...
@@ -79,12 +82,16 @@ import jp.agentec.abook.abv.bl.dto.ArchiveDto;
import
jp.agentec.abook.abv.bl.dto.ChatGroupDto
;
import
jp.agentec.abook.abv.bl.dto.ChatMessageDto
;
import
jp.agentec.abook.abv.bl.dto.ChatRoomDto
;
import
jp.agentec.abook.abv.bl.dto.MeetingDto
;
import
jp.agentec.abook.abv.bl.dto.PushMessageDto
;
import
jp.agentec.abook.abv.bl.dto.ShopMemberDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.CommunicationLogic
;
import
jp.agentec.abook.abv.bl.websocket.MeetingManager
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
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.ABVContentViewActivity
;
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
;
...
...
@@ -118,6 +125,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
private
final
String
PICTURE_COLLABORATION_PAGE_URL
=
"file:///android_asset/chat/public_new/collaboration_picture.html"
;
private
final
String
VIDEO_COLLABORATION_PAGE_URL
=
"file:///android_asset/chat/public_new/collaboration_video.html"
;
private
final
String
VOICE_COLLABORATION_PAGE_URL
=
"file:///android_asset/chat/public_new/collaboration_voice.html"
;
private
final
String
DOCUMENT_COLLABORATION_PAGE_URL
=
"file:///android_asset/chat/public_new/collaboration_documents.html"
;
private
final
String
DEFAULT_CHECKSUM
=
"0000000000"
;
//AISDevelop
...
...
@@ -132,11 +140,12 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
private
boolean
isOnline
;
private
Long
roomId
;
private
String
roomType
;
private
String
collaborationType
;
private
String
groupId
;
private
String
beforeRoomType
;
private
Integer
shopMemberId
;
private
String
selectedUserIdList
;
private
String
mSkey
;
// 0:協業生成, 1:協業参加
private
Integer
collaborationJoinFlg
=
0
;
...
...
@@ -177,6 +186,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
roomName
=
intent
.
getStringExtra
(
"roomName"
);
loginId
=
intent
.
getStringExtra
(
"loginId"
);
shopName
=
intent
.
getStringExtra
(
"shopName"
);
collaborationType
=
intent
.
getStringExtra
(
"collaborationType"
);
isOnline
=
false
;
}
...
...
@@ -272,8 +282,20 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
Integer
integerRoomId
=
Integer
.
parseInt
(
roomId
.
toString
());
roomType
=
communicationLogic
.
getChatRoom
(
integerRoomId
).
type
.
toString
();
String
parameterData
=
"sid="
+
sid
+
"&loginId="
+
loginId
+
"&shopName="
+
shopName
+
"&roomId="
+
roomId
+
"&roomName="
+
roomName
+
fixedParam
;
mChatWebView
.
postUrl
(
CHAT_ROOM_PAGE_URL
,
parameterData
.
getBytes
());
if
(
StringUtil
.
isNullOrEmpty
(
collaborationType
))
{
String
parameterData
=
"sid="
+
sid
+
"&loginId="
+
loginId
+
"&shopName="
+
shopName
+
"&roomId="
+
roomId
+
"&roomName="
+
roomName
+
fixedParam
;
mChatWebView
.
postUrl
(
CHAT_ROOM_PAGE_URL
,
parameterData
.
getBytes
());
}
else
{
collaborationJoinFlg
=
ABookCommConstants
.
FLAG
.
COLLABORATION_JOIN_FLG
.
INVITE
;
try
{
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
joinCollaboration
(
sid
,
roomId
.
intValue
());
}
catch
(
NetworkDisconnectedException
e
)
{
e
.
printStackTrace
();
}
catch
(
AcmsException
e
)
{
e
.
printStackTrace
();
}
moveCollaborationScreen
(
Integer
.
parseInt
(
collaborationType
));
}
}
else
{
// Chat
if
(
lastRoomName
.
length
()
>
0
&&
lastRoomId
.
length
()
>
0
)
{
String
parameterData
=
"sid="
+
sid
+
"&loginId="
+
loginId
+
"&shopName="
+
shopName
+
"&roomId="
+
lastRoomId
+
"&roomName="
+
lastRoomName
+
fixedParam
;
...
...
@@ -395,10 +417,9 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
message
=
getString
(
R
.
string
.
msg_chat_confirm_delete
);
}
else
if
(
message
.
equals
(
"error_already_exist_same_user"
))
{
message
=
getString
(
R
.
string
.
msg_error_already_exist_same_room
);
}
else
{
message
=
message
;
}
else
if
(
message
.
equals
(
"방장 권한을 전달 받으시겠습니까?"
))
{
message
=
getString
(
R
.
string
.
msg_confirm_send_host_change
)
;
}
ABookAlertDialog
confirmAlert
=
AlertDialogUtil
.
createAlertDialog
(
ChatWebviewActivity
.
this
,
R
.
string
.
app_name
);
confirmAlert
.
setMessage
(
message
);
...
...
@@ -425,7 +446,6 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
});
confirmAlert
.
setCancelable
(
false
);
showAlertDialog
(
confirmAlert
);
return
true
;
}
});
...
...
@@ -843,6 +863,16 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
@JavascriptInterface
public
void
openCommunicationHome
()
{
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
CHAT_PAGE_URL
);
}
});
}
@JavascriptInterface
public
void
openSetting
()
{
mChatWebView
.
post
(
new
Runnable
()
{
@Override
...
...
@@ -909,7 +939,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
@JavascriptInterface
public
void
createChatRoom
(
String
roomType
,
String
userIdList
,
String
encodedRoomName
,
String
screenFlg
)
throws
NetworkDisconnectedException
,
AcmsException
{
public
void
createChatRoom
(
String
roomType
,
String
userIdList
,
String
encodedRoomName
,
String
screenFlg
,
boolean
isVoice
)
throws
NetworkDisconnectedException
,
AcmsException
{
CreatedRoomJSON
resultJson
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
createRoom
(
sid
,
roomType
,
userIdList
,
encodedRoomName
,
loginId
);
if
(
ABookCommConstants
.
FLAG
.
SCREEN_FLG
.
MAKE_ROOM
.
equals
(
Integer
.
parseInt
(
screenFlg
)))
{
final
ChatRoomDto
chatRoomDto
=
communicationLogic
.
getChatRoom
(
resultJson
.
chatRoomDto
.
chatRoomId
);
...
...
@@ -927,12 +957,23 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
communicationLogic
.
addUserInRoom
(
StringUtil
.
join
(
","
,
userIdList
,
shopMemberId
.
toString
()),
resultJson
.
chatRoomDto
.
chatRoomId
);
final
Integer
chatRoomId
=
resultJson
.
chatRoomDto
.
chatRoomId
;
final
String
chatRoomName
=
resultJson
.
chatRoomDto
.
chatRoomName
;
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:CHAT_UI.joinRoom('%s', '%s');"
,
chatRoomId
,
chatRoomName
));
}
});
if
(
isVoice
)
{
roomId
=
chatRoomId
.
longValue
();
roomName
=
chatRoomName
;
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:CHAT_UI.startCollaboration('%s');"
,
ABookCommConstants
.
FLAG
.
COLLABORATION_TYPE
.
AUDIO
));
}
});
}
else
{
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:CHAT_UI.joinRoom('%s', '%s');"
,
chatRoomId
,
chatRoomName
));
}
});
}
}
@JavascriptInterface
...
...
@@ -974,16 +1015,18 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
@JavascriptInterface
public
void
inviteUsers
(
String
userIds
)
throws
NetworkDisconnectedException
,
AcmsException
{
public
void
inviteUsers
(
String
userIds
,
boolean
isCollaboration
)
throws
NetworkDisconnectedException
,
AcmsException
{
final
UserInviteResultJSON
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
inviteUsers
(
sid
,
roomId
.
intValue
(),
roomName
,
userIds
);
if
(
result
.
roomId
==
null
)
{
communicationLogic
.
addUserInRoom
(
userIds
,
roomId
.
intValue
());
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
CHAT_ROOM_PAGE_URL
);
}
});
if
(!
isCollaboration
)
{
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
CHAT_ROOM_PAGE_URL
);
}
});
}
}
else
{
mChatWebView
.
post
(
new
Runnable
()
{
@Override
...
...
@@ -1325,6 +1368,11 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
@JavascriptInterface
public
void
inviteCollaboration
(
String
inviteUserIds
,
String
collaborationType
)
throws
NetworkDisconnectedException
,
AcmsException
{
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
inviteCollaboration
(
sid
,
roomId
.
intValue
(),
roomName
,
inviteUserIds
,
collaborationType
);
}
@JavascriptInterface
public
void
startCollaboration
(
String
collaborationType
)
{
collaborationJoinFlg
=
ABookCommConstants
.
FLAG
.
COLLABORATION_JOIN_FLG
.
CREATE
;
moveCollaborationScreen
(
Integer
.
parseInt
(
collaborationType
));
...
...
@@ -1336,6 +1384,11 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
@JavascriptInterface
public
String
getCollaborationType
()
{
return
collaborationType
;
}
@JavascriptInterface
public
String
getToMoveGroupId
()
{
return
groupId
;
}
...
...
@@ -1354,6 +1407,72 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
public
String
getUserListByLoginId
(
String
loginIdList
)
{
return
communicationLogic
.
getUserListByLoginId
(
loginIdList
);
}
@JavascriptInterface
public
String
createContentView
()
{
Integer
meetingId
=
null
;
try
{
connectMeetingServer
();
List
<
MeetingDto
>
meetingList
=
meetingManager
.
getMeetingList
(
mSkey
);
for
(
MeetingDto
meeting
:
meetingList
)
{
if
(
meeting
.
title
.
equals
(
"Collaboration__"
+
roomId
)
&&
meetingManager
.
isOwner
())
{
meetingManager
.
deleteMeeting
(
meeting
.
meetingId
,
mSkey
);
}
}
meetingId
=
meetingManager
.
createMeeting
(
mSkey
,
"Collaboration_"
+
roomId
,
roomId
.
toString
());
meetingManager
.
join
(
meetingId
,
mSkey
,
roomId
.
toString
(),
true
);
}
catch
(
Exception
e
)
{
mChatWebView
.
loadUrl
(
"javascript:alert('"
+
"会議室サーバに接続できませんでした。"
+
"');"
);
}
PictureInPictureParams
.
Builder
mPipBuilder
=
new
PictureInPictureParams
.
Builder
();
enterPictureInPictureMode
(
mPipBuilder
.
build
());
return
meetingId
.
toString
();
}
@JavascriptInterface
public
void
startContentView
(
String
joinMeetingId
)
{
Integer
meetingId
;
try
{
connectMeetingServer
();
List
<
MeetingDto
>
meetingList
=
meetingManager
.
getMeetingList
(
mSkey
);
for
(
MeetingDto
meeting
:
meetingList
)
{
if
(
meeting
.
title
.
equals
(
"Collaboration__"
+
roomId
)
&&
meetingManager
.
isOwner
())
{
meetingManager
.
deleteMeeting
(
meeting
.
meetingId
,
mSkey
);
}
}
if
(
collaborationJoinFlg
==
0
)
{
meetingId
=
meetingManager
.
createMeeting
(
mSkey
,
"Collaboration_"
+
roomId
,
roomId
.
toString
());
meetingManager
.
join
(
meetingId
,
mSkey
,
roomId
.
toString
(),
true
);
}
else
{
meetingManager
.
join
(
Integer
.
parseInt
(
joinMeetingId
),
mSkey
,
roomId
.
toString
(),
true
);
}
}
catch
(
Exception
e
)
{
mChatWebView
.
loadUrl
(
"javascript:alert('"
+
"会議室サーバに接続できませんでした。"
+
"');"
);
}
PictureInPictureParams
.
Builder
mPipBuilder
=
new
PictureInPictureParams
.
Builder
();
enterPictureInPictureMode
(
mPipBuilder
.
build
());
}
@JavascriptInterface
public
void
startPipMode
()
{
PictureInPictureParams
.
Builder
mPipBuilder
=
new
PictureInPictureParams
.
Builder
();
enterPictureInPictureMode
(
mPipBuilder
.
build
());
}
@JavascriptInterface
public
void
exitMeetingRoom
()
{
if
(
meetingManager
.
isOwner
())
{
try
{
meetingManager
.
deleteMeeting
();
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"showMeetingExitDialog deleteMeeting error"
,
e
);
}
}
meetingManager
.
close
();
ActivityHandlingHelper
handlingHelper
=
ActivityHandlingHelper
.
getInstance
();
handlingHelper
.
saveMeetingInfo
(
null
,
null
,
null
,
false
);
}
}
/**
...
...
@@ -1368,6 +1487,11 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
startActivity
(
intent
,
NaviConsts
.
Left
);
}
public
void
connectMeetingServer
()
throws
Exception
{
meetingManager
=
MeetingManager
.
getInstance
();
mSkey
=
meetingManager
.
getSessionKey
(
true
);
}
private
void
updateMyInfoFromServer
()
throws
NetworkDisconnectedException
,
AcmsException
{
MyInfoJSON
resultJson
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
getMyInfo
(
sid
);
if
(
resultJson
.
shopMemberDto
!=
null
)
{
...
...
@@ -1433,6 +1557,14 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
});
break
;
case
4
:
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
DOCUMENT_COLLABORATION_PAGE_URL
);
}
});
break
;
default
:
break
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
View file @
3f6889a0
...
...
@@ -30,12 +30,10 @@ import java.util.Stack;
import
jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON
;
import
jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON
;
import
jp.agentec.abook.abv.bl.acms.type.DeliveryType
;
import
jp.agentec.abook.abv.bl.acms.type.DownloadStatusType
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
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.common.util.ContentFileUtil
;
import
jp.agentec.abook.abv.bl.common.util.JsonUtil
;
...
...
@@ -69,7 +67,6 @@ 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.UserPrefKey
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppNaviType
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorCode
;
import
jp.agentec.abook.abv.ui.common.constant.NaviConsts
;
import
jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog
;
import
jp.agentec.abook.abv.ui.common.util.ABVToastUtil
;
...
...
@@ -81,7 +78,6 @@ import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
import
jp.agentec.abook.abv.ui.viewer.activity.AudioPlayActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.DeviceImageListActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.EnqueteWebViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity
;
...
...
@@ -90,7 +86,6 @@ import jp.agentec.abook.abv.ui.viewer.activity.ParentWebViewActivity;
import
jp.agentec.abook.abv.ui.viewer.activity.PreviewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.VideoViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.theta.ThetaActivity
;
import
jp.agentec.abook.abv.ui.viewer.view.OperationTaskLayout
;
import
jp.agentec.adf.net.http.HttpDownloadSimpleNotification
;
import
jp.agentec.adf.util.CollectionUtil
;
import
jp.agentec.adf.util.DateTimeFormat
;
...
...
@@ -179,11 +174,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
@Override
public
void
run
()
{
try
{
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_
CLEAR_TOP
|
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_
SINGLE_TOP
);
if
(
page
!=
null
)
{
intent
.
putExtra
(
ABVActivity
.
PAGE
,
page
);
}
startContentActivity
(
mContext
,
intent
,
null
,
Intent
.
FLAG_ACTIVITY_
CLEAR_TOP
|
Intent
.
FLAG_ACTIVITY_NEW_TASK
,
contentId
);
startContentActivity
(
mContext
,
intent
,
null
,
Intent
.
FLAG_ACTIVITY_
SINGLE_TOP
,
contentId
);
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"startContentActivity contentId="
+
contentId
,
e
);
showToast
(
mContext
.
getString
(
R
.
string
.
E113
));
...
...
@@ -389,11 +384,15 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
recordContentReadLog
(
context
,
contentId
);
}
Activity
act
=
getCurrentActivity
();
if
(
act
instanceof
ChatWebviewActivity
)
{
act
=
getActivity
(
OperationRelatedContentActivity
.
class
);
}
intent
.
setClass
(
act
,
ContentViewActivity
.
class
);
if
(!
StringUtil
.
equalsAny
(
contentType
,
ContentJSON
.
KEY_HTML_TYPE
,
ContentJSON
.
KEY_LINK_TYPE
,
ContentJSON
.
KEY_ENQUETE_TYPE
,
ContentJSON
.
KEY_EXAM_TYPE
,
ContentJSON
.
KEY_PANO_MOVIE_TYPE
,
ContentJSON
.
KEY_PANO_IMAGE_TYPE
,
ContentJSON
.
KEY_OBJECTVR_TYPE
))
{
contex
t
.
startActivity
(
intent
);
ac
t
.
startActivity
(
intent
);
}
}
...
...
@@ -717,7 +716,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
*/
public
synchronized
void
finishAllContentViewActivity
()
{
for
(
ABVAuthenticatedActivity
activity
:
currentActivityStack
)
{
if
(
activity
instanceof
ABVContentViewActivity
)
{
if
(
activity
instanceof
ABVContentViewActivity
&&
!(
activity
instanceof
ChatWebviewActivity
)
)
{
activity
.
finish
();
}
}
...
...
@@ -734,7 +733,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
int
activitySize
=
currentActivityStack
.
size
();
for
(
int
i
=
1
;
i
<
activitySize
-
1
;
i
++)
{
ABVAuthenticatedActivity
activity
=
currentActivityStack
.
get
(
currentActivityStack
.
size
()
-
i
);
if
(
activity
instanceof
ABVContentViewActivity
)
{
if
(
activity
instanceof
ABVContentViewActivity
&&
!(
activity
instanceof
ChatWebviewActivity
)
)
{
activity
.
finish
();
}
}
...
...
@@ -842,6 +841,10 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
}
public
Stack
<
ABVAuthenticatedActivity
>
getCurrentActivityStack
()
{
return
currentActivityStack
;
}
public
void
setRequireHomeReload
(
boolean
requireHomeReload
)
{
this
.
requireHomeReload
=
requireHomeReload
;
}
...
...
@@ -1552,7 +1555,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
public
String
getLocaleFileName
()
{
Locale
primaryLocale
=
mContext
.
getResources
().
getConfiguration
().
getLocales
().
get
(
0
);
Locale
primaryLocale
;
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
N
)
{
primaryLocale
=
mContext
.
getResources
().
getConfiguration
().
getLocales
().
get
(
0
);
}
else
{
primaryLocale
=
mContext
.
getResources
().
getConfiguration
().
locale
;
}
String
locale
=
primaryLocale
.
getDisplayName
();
String
localeLanguage
=
"en"
;
if
(
primaryLocale
.
equals
(
Locale
.
JAPAN
)
||
primaryLocale
.
equals
(
Locale
.
JAPANESE
))
{
...
...
@@ -1907,4 +1915,44 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
this
.
previousOfSettingActivity
=
null
;
this
.
previousOfSettingActivity2
=
activity
;
}
public
void
startChatWebviewActivityWithCollaboration
(
Long
roomId
,
String
roomName
,
String
collaborationType
)
{
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
(
"loginId"
,
loginId
);
intent
.
putExtra
(
"collaborationType"
,
collaborationType
);
intent
.
putExtra
(
"shopName"
,
shopName
);
intent
.
putExtra
(
"roomId"
,
roomId
);
intent
.
putExtra
(
"roomName"
,
roomName
);
intent
.
setClassName
(
mContext
.
getPackageName
(),
className
);
Activity
activity2
=
null
;
if
(!
currentActivityStack
.
isEmpty
())
{
int
size
=
currentActivityStack
.
size
();
for
(
int
i
=
size
-
1
;
i
>=
0
;
i
--)
{
ABVAuthenticatedActivity
activity
=
currentActivityStack
.
elementAt
(
i
);
if
(
activity
instanceof
ChatWebviewActivity
)
{
activity2
=
(
ChatWebviewActivity
)
activity
;
}
}
}
if
(
activity2
!=
null
)
{
activity2
.
finish
();
activity2
.
startActivity
(
intent
);
}
else
{
Activity
activity
=
getCurrentActivity
();
if
(
activity
!=
null
)
{
activity
.
startActivity
(
intent
);
}
}
}
}
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