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
2ed6b474
Commit
2ed6b474
authored
Jul 29, 2020
by
yuichiro ogawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chat機能移植及びリファクタリング
parent
7218f80e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
78 additions
and
26 deletions
+78
-26
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
+5
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+3
-2
ABVJE_Res_Default_Android/res/values-ja/strings.xml
+0
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
+30
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+1
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVUIActivity.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+12
-17
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/LoginActivity.java
+6
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
+8
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
+4
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
+4
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLXWalkWebViewActivity.java
+4
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ParentWebViewActivity.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/helper/SceneSendHelper.java
+1
-1
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
View file @
2ed6b474
...
...
@@ -625,19 +625,21 @@ public class AcmsClient implements AcmsClientResponseListener {
/**
* パノラマで使用するシーンを登録
* @param sid
* @param contentId
* @param FormFile シーンで使用する画像
* @return
* @throws IOException
* @throws AcmsException
*/
public
SceneEntryJSON
sceneEntry
(
String
sid
,
File
FormFile
)
throws
IOException
,
AcmsException
,
NetworkDisconnectedException
{
public
SceneEntryJSON
sceneEntry
(
String
sid
,
Long
contentId
,
File
FormFile
)
throws
IOException
,
AcmsException
,
NetworkDisconnectedException
{
if
(
networkAdapter
!=
null
&&
!
networkAdapter
.
isNetworkConnected
())
{
// NWのチェック
throw
new
NetworkDisconnectedException
();
}
String
apiUrl
=
AcmsApis
.
getApiUrl
(
env
.
acmsAddress
,
urlPath
,
AcmsApis
.
ApiSceneEntry
);
HttpMultipart
part1
=
new
HttpMultipart
(
ABookKeys
.
SID
,
sid
);
HttpMultipart
part2
=
new
HttpMultipart
(
ABookKeys
.
FORM_FILE
,
FormFile
);
HttpResponse
result
=
HttpRequestSender
.
post
(
apiUrl
,
new
HttpMultipart
[]{
part1
,
part2
});
HttpMultipart
part2
=
new
HttpMultipart
(
ABookKeys
.
CONTENT_ID
,
StringUtil
.
toString
(
contentId
));
HttpMultipart
part3
=
new
HttpMultipart
(
ABookKeys
.
FORM_FILE
,
FormFile
);
HttpResponse
result
=
HttpRequestSender
.
post
(
apiUrl
,
new
HttpMultipart
[]{
part1
,
part2
,
part3
});
SceneEntryJSON
json
=
new
SceneEntryJSON
(
result
.
httpResponseBody
);
if
(
json
.
httpStatus
!=
200
)
{
if
(
json
.
errorMessage
!=
null
)
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
2ed6b474
...
...
@@ -1391,11 +1391,12 @@ public class OperationLogic extends AbstractLogic {
/**
* シーンの登録
* @param file
* @param contentId
* @throws IOException
* @throws AcmsException
*/
public
Integer
sendScene
(
File
file
)
throws
IOException
,
AcmsException
,
NetworkDisconnectedException
{
SceneEntryJSON
json
=
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
sceneEntry
(
cache
.
getMemberInfo
().
sid
,
file
);
public
Integer
sendScene
(
File
file
,
Long
contentId
)
throws
IOException
,
AcmsException
,
NetworkDisconnectedException
{
SceneEntryJSON
json
=
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
sceneEntry
(
cache
.
getMemberInfo
().
sid
,
contentId
,
file
);
return
json
.
resourceId
;
}
...
...
ABVJE_Res_Default_Android/res/values-ja/strings.xml
View file @
2ed6b474
...
...
@@ -344,7 +344,6 @@
<string
name=
"operation_related_content"
>
関連資料
</string>
<string
name=
"new_content"
>
新着
</string>
<string
name=
"save_all"
>
一括保存
</string>
<string
name=
"content_update"
>
更新
</string>
<string
name=
"remote_support"
>
遠隔支援
</string>
<string
name=
"remote_support_list"
>
遠隔支援一覧
</string>
<string
name=
"new_make"
>
新規作成
</string>
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
View file @
2ed6b474
...
...
@@ -168,6 +168,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
protected
PushMessageListAdapter
mPushMessageListAdapter
;
protected
ListView
mFixPushMessageListView
;
protected
Dialog
mPushMessageSendDialog
;
protected
ImageButton
communicationButton
;
// コミュニケーションボタン
protected
int
mSelectedFixPuchMessagePosition
;
protected
int
mSendType
;
protected
PushMessageLogic
pushMessageLogic
=
AbstractLogic
.
getLogic
(
PushMessageLogic
.
class
);
...
...
@@ -978,6 +979,11 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
}
else
{
showPushMessageDetailView
(
dto
);
}
// プッシュメッセージで未読がなければ、下辺ツールバーのコミュニケーションボタンのバッジを外す
List
<
PushMessageDto
>
checkPushMessageList
=
mPushMessageListAdapter
.
getItems
();
if
(!
checkUnReadCommunication
(
checkPushMessageList
))
{
communicationButton
.
setImageResource
(
R
.
drawable
.
ic_communication_menu
);
}
}
});
mPushMessageListView
.
invalidate
();
...
...
@@ -1238,4 +1244,28 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
ProgressDialogHelper
.
closeProgressPopup
();
}
}
// コミュニケーションのアイコン設定(未既読があれば、バッチ付きアイコンでセット)
protected
void
setCommunicationImageButton
()
{
List
<
PushMessageDto
>
pushMessageDtoList
=
pushMessageLogic
.
getAllPushMessageList
();
boolean
existUnreadFlg
=
checkUnReadCommunication
(
pushMessageDtoList
);
communicationButton
.
setImageResource
(
existUnreadFlg
?
R
.
drawable
.
ic_communication_menu_with_badge
:
R
.
drawable
.
ic_communication_menu
);
}
/**
* 未読のプッシュメッセージが存在するかチェック
* @param pushMessageDtoList チェックするリスト
* @return
*/
private
boolean
checkUnReadCommunication
(
List
<
PushMessageDto
>
pushMessageDtoList
)
{
boolean
existUnreadFlg
=
false
;
for
(
PushMessageDto
pushMessageDto
:
pushMessageDtoList
)
{
if
(!
pushMessageDto
.
readingFlg
)
{
existUnreadFlg
=
true
;
break
;
}
}
return
existUnreadFlg
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
2ed6b474
...
...
@@ -90,6 +90,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
private
static
final
String
TAG
=
"ABVContentViewActivity"
;
public
final
static
int
ABOOK_CHECK_TASK_IMAGE
=
103
;
public
final
static
int
ABOOK_CHECK_TASK_VIDEO
=
104
;
protected
final
static
int
ABOOK_CHECK_SELECT_SCENE
=
105
;
protected
long
contentId
;
// 表示中のコンテンツID
protected
long
objectId
;
// オブジェクトID(オブジェクト用のActivityのときのみ使用)
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVUIActivity.java
View file @
2ed6b474
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
2ed6b474
...
...
@@ -37,6 +37,7 @@ import java.io.FileOutputStream;
import
java.io.OutputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
...
...
@@ -83,10 +84,6 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
private
ImageButton
mOperationHomeButton
;
// ホームボタン
private
ImageButton
mOperationRelatedContentButton
;
// 関連資料ボタン
private
ImageButton
mCommunicationButton
;
// コミュニケーションボタン
protected
PushMessageLogic
pushMessageLogic
=
AbstractLogic
.
getLogic
(
PushMessageLogic
.
class
);
private
Dialog
mCommunicationMenuDialog
;
private
BroadcastReceiver
receiver
;
...
...
@@ -281,7 +278,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
receiver
=
new
BroadcastReceiver
()
{
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
if
(
intent
.
getAction
().
equals
(
DownloadManager
.
ACTION_DOWNLOAD_COMPLETE
))
{
if
(
DownloadManager
.
ACTION_DOWNLOAD_COMPLETE
.
equals
(
intent
.
getAction
()
))
{
mChatWebView
.
loadUrl
(
"javascript:dismissLoadingIndicator()"
);
}
}
...
...
@@ -303,7 +300,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
Logger
.
d
(
"url"
,
"url : "
+
url
);
Uri
uri
=
Uri
.
parse
(
url
);
String
fileName
=
new
File
(
uri
.
getPath
(
)).
getName
();
String
fileName
=
new
File
(
Objects
.
requireNonNull
(
uri
.
getPath
()
)).
getName
();
// イメージをダウンロードする(png, jpg, jpeg, mp4, mov)
if
(
url
.
toLowerCase
().
endsWith
(
".png"
)
||
url
.
toLowerCase
().
endsWith
(
".jpg"
)
||
url
.
toLowerCase
().
endsWith
(
".jpeg"
)
...
...
@@ -315,6 +312,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
File
destinationFile
=
new
File
(
Environment
.
getExternalStorageDirectory
(),
fileName
);
request
.
setDescription
(
"Downloading ..."
);
request
.
setNotificationVisibility
(
DownloadManager
.
Request
.
VISIBILITY_VISIBLE_NOTIFY_COMPLETED
);
request
.
setDestinationUri
(
Uri
.
fromFile
(
destinationFile
));
assert
mdDownloadManager
!=
null
;
mdDownloadManager
.
enqueue
(
request
);
}
else
{
// その他のファイルはurlのみ確認
Logger
.
d
(
"download "
,
"download URL :"
+
url
);
...
...
@@ -349,7 +347,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
showCommonContent
();
}
});
mC
ommunicationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_communication_menu
);
c
ommunicationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_communication_menu
);
// Toolbar
settingBottomToolbar
();
...
...
@@ -385,7 +383,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
// コミュニケーションボタン
mC
ommunicationButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
c
ommunicationButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
// ABVUIActivity activity = ActivityHandlingHelper.getInstance().getPreviousOfSettingActivity();
...
...
@@ -643,13 +641,6 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
mUploadMessage
=
null
;
}
// コミュニケーションのアイコン設定(未既読があれば、バッチ付きアイコンでセット)
private
void
setCommunicationImageButton
()
{
List
<
PushMessageDto
>
pushMessageDtoList
=
pushMessageLogic
.
getAllPushMessageList
();
boolean
existUnreadFlg
=
checkUnReadCommunication
(
pushMessageDtoList
);
mCommunicationButton
.
setImageResource
(
existUnreadFlg
?
R
.
drawable
.
ic_communication_menu_with_badge
:
R
.
drawable
.
ic_communication_menu
);
}
/**
* 未読のプッシュメッセージが存在するかチェック
* @param pushMessageDtoList チェックするリスト
...
...
@@ -761,7 +752,9 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
// 指定したディレクトリに含まれるファイル、ディレクトリの一覧を String 型の配列で返す。
fileName
=
directory
.
list
();
if
(
fileName
==
null
)
break
;
if
(
fileName
==
null
)
{
break
;
}
n
=
0
;
while
(
fileName
.
length
>
n
){
...
...
@@ -806,7 +799,9 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
// java.io.File クラスのメソッド list()
// 指定したディレクトリに含まれるファイル、ディレクトリの一覧を String 型の配列で返す。
fileName
=
directory
.
list
();
if
(
fileName
==
null
)
break
;
if
(
fileName
==
null
)
{
break
;
}
n
=
0
;
while
(
fileName
.
length
>
n
){
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/LoginActivity.java
View file @
2ed6b474
...
...
@@ -398,7 +398,12 @@ public class LoginActivity extends ABVLoginActivity {
CommonExecutor
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
fcmRegister
();
if
(
oldMemberInfoDto
!=
null
&&
oldMemberInfoDto
.
loginStatus
==
LoginStatus
.
LimitLogin
.
statusCode
())
{
// アプリロックの場合サーバ認証せずにログイン
offlineLogin
();
}
else
{
fcmRegister
();
}
}
});
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
View file @
2ed6b474
...
...
@@ -364,7 +364,14 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
@Override
public
boolean
onKeyUp
(
int
keyCode
,
KeyEvent
event
)
{
if
(
keyCode
!=
KeyEvent
.
KEYCODE_BACK
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
if
(
mAddReport
)
{
ozdCancelProcess
();
// Ozd作業画面を閉じる
}
else
{
// 作業追加区分がなしの場合
goToMain
();
// 一覧画面に遷移
}
}
else
{
return
super
.
onKeyUp
(
keyCode
,
event
);
}
return
false
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
View file @
2ed6b474
...
...
@@ -1535,6 +1535,10 @@ public class ContentViewActivity extends ABVContentViewActivity {
public
boolean
onKeyUp
(
int
keyCode
,
KeyEvent
event
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
Logger
.
d
(
TAG
,
"KeyEvent.KEYCODE_BACK"
);
if
(
mOperationId
!=
null
&&
mOperationId
>
-
1
)
{
putUserPref
(
AppDefType
.
UserPrefKey
.
SYNC_TARGET_OPERATION_ID
,
mOperationId
);
}
if
(
isVideoMax
)
{
videoMaxToDefault
();
}
else
if
(
isMarking
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
View file @
2ed6b474
...
...
@@ -709,6 +709,10 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
return
;
}
mUploadMessage
.
onReceiveValue
(
result
);
}
else
if
(
requestCode
==
ABOOK_CHECK_SELECT_SCENE
)
{
if
(
intent
!=
null
&&
result
!=
null
)
{
confirmEntrySceneDialog
(
result
[
0
]);
}
}
mUploadMessage
=
null
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLXWalkWebViewActivity.java
View file @
2ed6b474
...
...
@@ -729,6 +729,10 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
}
// 動画
mUploadMessage
.
onReceiveValue
(
result
);
}
else
if
(
requestCode
==
ABOOK_CHECK_SELECT_SCENE
)
{
if
(
intent
!=
null
&&
result
!=
null
)
{
confirmEntrySceneDialog
(
result
);
}
}
mUploadMessage
=
null
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ParentWebViewActivity.java
View file @
2ed6b474
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/helper/SceneSendHelper.java
View file @
2ed6b474
...
...
@@ -58,7 +58,7 @@ public class SceneSendHelper {
if
(
isBaseSceneUpload
&&
!
isBaseSceneUploadSuccess
&&
firstFilePath
.
equals
(
filePath
))
{
AbstractLogic
.
getLogic
(
OperationLogic
.
class
).
sendPanoContent
(
operationId
,
OperationName
,
file
);
}
else
{
AbstractLogic
.
getLogic
(
OperationLogic
.
class
).
sendScene
(
file
);
AbstractLogic
.
getLogic
(
OperationLogic
.
class
).
sendScene
(
file
,
null
);
}
needSendImages
.
remove
(
filePath
);
...
...
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