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
d1d7ccfa
Commit
d1d7ccfa
authored
Aug 23, 2021
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
プッシュメッセージを格納するJSONクラスを作成
parent
50b97e6a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
110 additions
and
14 deletions
+110
-14
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/ChatPushDataJSON.java
+0
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
+11
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/push/PushMessageJSON.java
+88
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+0
-3
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
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLXWalkWebViewActivity.java
+6
-5
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/OperationTaskLayout.java
+3
-2
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/ChatPushDataJSON.java
View file @
d1d7ccfa
...
...
@@ -48,9 +48,6 @@ public class ChatPushDataJSON extends AcmsCommonJSON {
}
PushMessageDto
pushMessageDto
=
new
PushMessageDto
();
String
tempDate
=
DateTimeUtil
.
toString
(
DateTimeUtil
.
toDate
(
pushMessagetJsonArray
.
getJSONObject
(
k
).
getString
(
PushSendDate
),
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
),
DateTimeFormat
.
yyyyMMddHHmmssSSS_none
);
Logger
.
d
(
"messageId"
,
"messageId : "
+
pushMessagetJsonArray
.
getJSONObject
(
k
).
getString
(
PushSendDate
));
Logger
.
d
(
"oerationId"
,
"oerationId : "
+
pushMessagetJsonArray
.
getJSONObject
(
k
).
getString
(
PushSendDate
)+
1
);
Logger
.
d
(
"date"
,
"date : "
+
tempDate
);
pushMessageDto
.
pushMessageId
=
Long
.
valueOf
(
tempDate
);
pushMessageDto
.
operationId
=
Long
.
valueOf
(
tempDate
+
1
);
pushMessageDto
.
pushSendLoginId
=
pushMessagetJsonArray
.
getJSONObject
(
k
).
getString
(
PushSendLoginId
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
View file @
d1d7ccfa
...
...
@@ -171,4 +171,15 @@ public interface ABookCommConstants {
String
DEFAULT_CHECKSUM
=
"0000000000"
;
String
PLATFORM_NAME
=
"android"
;
int
PUSH_MESSAGE_DLG_REQUEST_CODE
=
200
;
interface
PUSH_MESSAGE_DLG_RESULT
{
int
OK
=
0
;
int
CANCEL
=
1
;
}
// ABookCheckで、onActivityResultのリクエストコードとして使用されている
int
ABOOK_CHECK_TASK_IMAGE
=
103
;
int
ABOOK_CHECK_TASK_VIDEO
=
104
;
int
ABOOK_CHECK_SELECT_SCENE
=
105
;
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/push/PushMessageJSON.java
0 → 100644
View file @
d1d7ccfa
package
jp
.
agentec
.
abook
.
abv
.
cl
.
push
;
import
org.json.adf.JSONObject
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
/**
* プッシュメッセージをJSONにしたクラス
* 既存のデータのキーは、AppDefType.PushMessageKey
* チャットで追加されたデータのキーは、AppDefType.ChatPushMessageKey
*/
public
class
PushMessageJSON
{
private
JSONObject
jsonObject
;
public
PushMessageJSON
(
String
jsonText
)
{
jsonObject
=
new
JSONObject
(
jsonText
);
}
// プッシュメッセージデータ
public
String
getMessage
()
{
return
jsonObject
.
getString
(
AppDefType
.
PushMessageKey
.
message
);
}
public
String
getData
()
{
try
{
return
jsonObject
.
getString
(
AppDefType
.
PushMessageKey
.
data
);
}
catch
(
Exception
e
)
{
return
""
;
}
}
public
String
getOperationID
()
{
try
{
return
jsonObject
.
getString
(
AppDefType
.
PushMessageKey
.
operationId
);
}
catch
(
Exception
e
)
{
return
""
;
}
}
// ここからチャットデータ
public
String
getRoomName
()
{
try
{
return
jsonObject
.
getString
(
AppDefType
.
ChatPushMessageKey
.
roomName
);
}
catch
(
Exception
e
){
return
""
;
}
}
public
Long
getRoomId
()
{
try
{
return
jsonObject
.
getLong
(
AppDefType
.
ChatPushMessageKey
.
roomId
);
}
catch
(
Exception
e
){
return
new
Long
(
0
);
}
}
public
String
getRoomType
()
{
try
{
return
jsonObject
.
getString
(
AppDefType
.
ChatPushMessageKey
.
roomType
);
}
catch
(
Exception
e
){
return
""
;
}
}
public
String
getPushSendLoginId
()
{
try
{
return
jsonObject
.
getString
(
AppDefType
.
ChatPushMessageKey
.
pushSendLoginId
);
}
catch
(
Exception
e
)
{
return
""
;
}
}
public
long
getPushSendDate
()
{
try
{
return
jsonObject
.
getLong
(
AppDefType
.
ChatPushMessageKey
.
pushSendDate
);
}
catch
(
Exception
e
)
{
return
0
;
}
}
public
String
getCollaborationType
()
{
try
{
return
jsonObject
.
getString
(
AppDefType
.
ChatPushMessageKey
.
collaborationType
);
}
catch
(
Exception
e
)
{
return
""
;
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
d1d7ccfa
...
...
@@ -89,9 +89,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected
static
GroupLogic
groupLogic
=
AbstractLogic
.
getLogic
(
GroupLogic
.
class
);
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/appinfo/AppDefType.java
View file @
d1d7ccfa
...
...
@@ -147,5 +147,6 @@ public interface AppDefType {
String
roomType
=
"roomType"
;
String
shopName
=
"shopName"
;
String
loginId
=
"loginId"
;
String
fromClassName
=
"fromClassName"
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebViewActivity.java
View file @
d1d7ccfa
...
...
@@ -307,7 +307,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
result
=
startCameraIntent
(
ABOOK_CHECK_TASK_IMAGE
,
"Camera"
,
ABookKeys
.
IMAGE
,
true
);
// 動画が選択された場合
}
else
if
(
fileChooserParams
.
getAcceptTypes
()[
0
].
toLowerCase
().
contains
(
ABookKeys
.
VIDEO
))
{
result
=
startCameraIntent
(
ABOOK_CHECK_TASK_VIDEO
,
"
Camera
"
,
ABookKeys
.
VIDEO
,
true
);
result
=
startCameraIntent
(
ABOOK_CHECK_TASK_VIDEO
,
"
Video
"
,
ABookKeys
.
VIDEO
,
true
);
}
if
(
result
)
{
if
(
mUploadMessage
!=
null
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLXWalkWebViewActivity.java
View file @
d1d7ccfa
...
...
@@ -37,6 +37,7 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import
jp.agentec.abook.abv.bl.common.Callback
;
import
jp.agentec.abook.abv.bl.common.CommonExecutor
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.constant.ABookCommConstants
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.dao.AbstractDao
;
...
...
@@ -224,9 +225,9 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
Logger
.
d
(
TAG
,
"*********************commonOpenFileChooser"
);
boolean
result
=
false
;
if
(
acceptType
.
toLowerCase
().
indexOf
(
ABookKeys
.
IMAGE
)
!=
-
1
)
{
result
=
startCameraIntent
(
ABOOK_CHECK_TASK_IMAGE
,
"Camera"
,
ABookKeys
.
IMAGE
,
true
);
result
=
startCameraIntent
(
AB
ookCommConstants
.
AB
OOK_CHECK_TASK_IMAGE
,
"Camera"
,
ABookKeys
.
IMAGE
,
true
);
}
else
if
(
acceptType
.
toLowerCase
().
indexOf
(
ABookKeys
.
VIDEO
)
!=
-
1
)
{
result
=
startCameraIntent
(
ABOOK_CHECK_TASK_VIDEO
,
"Video"
,
ABookKeys
.
VIDEO
,
true
);
result
=
startCameraIntent
(
AB
ookCommConstants
.
AB
OOK_CHECK_TASK_VIDEO
,
"Video"
,
ABookKeys
.
VIDEO
,
true
);
}
mUploadMessage
=
uploadFile
;
if
(
result
)
{
...
...
@@ -713,7 +714,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
intent
)
{
Uri
result
=
(
intent
==
null
||
resultCode
!=
RESULT_OK
)
?
null
:
intent
.
getData
();
if
(
requestCode
==
ABOOK_CHECK_TASK_IMAGE
)
{
if
(
requestCode
==
AB
ookCommConstants
.
AB
OOK_CHECK_TASK_IMAGE
)
{
if
(
mUploadMessage
==
null
)
{
return
;
}
...
...
@@ -729,13 +730,13 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
mUploadMessage
.
onReceiveValue
(
null
);
ErrorMessage
.
showErrorMessageToast
(
getApplicationContext
(),
ErrorCode
.
E107
);
}
}
else
if
(
requestCode
==
ABOOK_CHECK_TASK_VIDEO
)
{
}
else
if
(
requestCode
==
AB
ookCommConstants
.
AB
OOK_CHECK_TASK_VIDEO
)
{
if
(
mUploadMessage
==
null
)
{
return
;
}
// 動画
mUploadMessage
.
onReceiveValue
(
result
);
}
else
if
(
requestCode
==
ABOOK_CHECK_SELECT_SCENE
)
{
}
else
if
(
requestCode
==
AB
ookCommConstants
.
AB
OOK_CHECK_SELECT_SCENE
)
{
if
(
intent
!=
null
&&
result
!=
null
)
{
confirmEntrySceneDialog
(
result
);
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/OperationTaskLayout.java
View file @
d1d7ccfa
...
...
@@ -23,6 +23,7 @@ import org.json.adf.JSONObject;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.constant.ABookCommConstants
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.dao.AbstractDao
;
...
...
@@ -131,10 +132,10 @@ public class OperationTaskLayout extends RelativeLayout {
FileChooserParams
fileChooserParams
)
{
boolean
result
=
false
;
if
(
fileChooserParams
.
getAcceptTypes
()[
0
].
toLowerCase
().
indexOf
(
ABookKeys
.
IMAGE
)
!=
-
1
)
{
result
=
((
ABVActivity
)
context
).
startCameraIntent
(
((
ABVContentViewActivity
)
context
)
.
ABOOK_CHECK_TASK_IMAGE
,
"Camera"
,
ABookKeys
.
IMAGE
,
true
);
result
=
((
ABVActivity
)
context
).
startCameraIntent
(
ABookCommConstants
.
ABOOK_CHECK_TASK_IMAGE
,
"Camera"
,
ABookKeys
.
IMAGE
,
true
);
}
else
if
(
fileChooserParams
.
getAcceptTypes
()[
0
].
toLowerCase
().
indexOf
(
ABookKeys
.
VIDEO
)
!=
-
1
)
{
result
=
((
ABVActivity
)
context
).
startCameraIntent
(
((
ABVContentViewActivity
)
context
)
.
ABOOK_CHECK_TASK_VIDEO
,
"Video"
,
ABookKeys
.
VIDEO
,
true
);
result
=
((
ABVActivity
)
context
).
startCameraIntent
(
ABookCommConstants
.
ABOOK_CHECK_TASK_VIDEO
,
"Video"
,
ABookKeys
.
VIDEO
,
true
);
}
if
(
result
)
{
...
...
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