Commit 6c803151 by Kim Eunchul

Merge branch 'communication/develop' into 'communication/develop_kim-ec'

Communication/develop

See merge request !218
parents 691a442a 731b6188
[submodule "ABookCommunication_WebView"]
path = ABVJE_Launcher_Android/assets/chat
url = git@gitlab.agentec.jp:abookCommunication/chat_webview.git
[submodule "ABVJE_Launcher_Android/assets/check"]
path = ABVJE_Launcher_Android/assets/check
url = https://gitlab.agentec.jp/abookCheck/design.git
......@@ -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);
......
......@@ -61,6 +61,9 @@ public class OperationListJSON extends AcmsCommonJSON {
public static final String OperationGroupMasterIdList = "operationGroupMasterIdList";
public static final String QuickReport = "quickReport";
public static final String PermitCode = "permitCode";
public static final String PermitCodeRequiredFlg = "permitCodeRequiredFlg";
public static final String DisplayPermissionFlg = "displayPermissionFlg";
public List<OperationDto> operationList;
......@@ -92,6 +95,9 @@ public class OperationListJSON extends AcmsCommonJSON {
dto.enableReportEdit = operationJson.has(EnableReportEdit) ? operationJson.getInt(EnableReportEdit) : 0; // 作業編集区分
dto.enableAddReport = operationJson.has(EnableAddReport) ? operationJson.getInt(EnableAddReport) : 0; // 作業追加区分
dto.quickReport = operationJson.has(QuickReport) ? operationJson.getInt(QuickReport) : 0;
dto.permitCode = operationJson.has(PermitCode) ? operationJson.getString(PermitCode) : "";
dto.permitCodeRequiredFlg = operationJson.has(PermitCodeRequiredFlg) ? operationJson.getInt(PermitCodeRequiredFlg) : 0;
dto.displayPermissionFlg = operationJson.has(DisplayPermissionFlg) ? operationJson.getInt(DisplayPermissionFlg) : 0;
// 作業終了更新日
if (operationJson.has(OperationLastEditDate)) {
......
......@@ -51,6 +51,7 @@ public class ContentJSON extends AbstractJSON {
public static final String KEY_WIDTH = "width";
public static final String KEY_BACKGROUND_COLOR = "backgroundColor";
public static final String KEY_BACKGROUND_ALPHA = "backgroundAlpha";
public static final String KEY_LIST_TYPE = "list";
private JSONArray mPages;
......
......@@ -168,5 +168,11 @@ public interface ServiceOption {
* 利用しない:N(通常)、利用する:Y
*/
int UsableIOReport = 186;
/**
* RFID・バーコード使用
* 利用しない:N(通常)、利用する:Y
*/
int UsableRFIDBarcodeScan = 190;
}
}
\ No newline at end of file
......@@ -164,8 +164,23 @@ public interface ABookCommConstants {
String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public_new/chat.html";
String CHAT_PAGE_URL = "file:///android_asset/chat/public_new/chat.html";
String CHAT_ROOM_PAGE_URL = "file:///android_asset/chat/public_new/chat_room.html";
String ARCHIVE_URL = "file:///android_asset/chat/public_new/archive.html";
String ARCHIVE_DETAIL_URL = "file:///android_asset/chat/public_new/archive_detail.html";
String CONTACT_URL = "file:///android_asset/chat/public_new/contact.html";
String COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration.html";
String DEFAULT_CHECKSUM = "0000000000";
String PLATFORM_NAME = "android";
String CHAT_MESSAGE_SEPERATOR = "<::split>";
String INVITE_COLLABORATION = "inviteCollaboration" + CHAT_MESSAGE_SEPERATOR;
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;
}
......@@ -15,6 +15,43 @@ public class ABookKeys {
public static final String OPERATION_ID = "operationId";
public static final String OPERATION_NAME = "operationName";
public static final String OPERATION_LIST = "operationList";
public static final String OPERATION_DESCRIPTIONS = "operationDescriptions";
public static final String OPERATION_TYPE = "operationType";
public static final String OPERATION_START_DATE = "operationStartDate";
public static final String OPERATION_END_DATE = "operationEndDate";
public static final String OPERATION_OPEN_DATE = "operationOpenDate";
public static final String LAST_EDIT_DATE = "lastEditDate";
public static final String NEED_SYNC_FLG = "needSyncFlg";
public static final String REPORT_TYPE = "reportType";
public static final String ENABLE_REPORT_HISTORY = "enableReportHistory";
public static final String ENABLE_ADD_REPORT = "enableAddReport";
public static final String QUICK_REPORT = "quickReport";
public static final String PERMIT_CODE_REQUIRED_FLG = "permitCodeRequiredFlg";
public static final String PERMIT_CODE = "permitCode";
public static final String DISPLAY_PERMISSION_FLG = "displayPermissionFlg";
public static final String OPERATION_GROUPMASTER_LIST = "operationGroupMasterList";
public static final String OPERATION_GROUPMASTER_ID = "operationGroupMasterId";
public static final String OPERATION_GROUPMASTER_NAME = "operationGroupMasterName";
public static final String OPERATION_GROUPMASTER_LEVEL = "operationGroupMasterLevel";
public static final String OPERATION_GROUPMASTER_PARENTID = "parentOperationGroupMasterId";
public static final String OPERATION_GROUPMASTER_TREEPATH = "treePath";
public static final String OPERATION_GROUPMASTER_COUNTOPERATION = "countOperation";
public static final String OPERATION_GROUPMASTER_RELATION_LIST = "operationGroupMasterRelationList";
public static final String OPERATION_GROUPMASTER_RELATION_MASTERID = "operationGroupMasterId";
public static final String OPERATION_GROUPMASTER_RELATION_OPERATIONID = "operationId";
public static final String OPERATION_PUSHMESSAGE_LIST = "pushMessageList";
public static final String OPERATION_PUSHMESSAGEID = "pushMessageId";
public static final String OPERATION_OPERATIONID = "operationId";
public static final String OPERATION_OPERATIONNAME = "operationName";
public static final String OPERATION_PUSHSENDLOGINID = "pushSendLoginId";
public static final String OPERATION_PUSHSENDDATE = "pushSendDate";
public static final String OPERATION_PUSHMESSAGE = "pushMessage";
public static final String OPERATION_READINGFLG = "readingFlg";
// ABOOKCHECK SCHEME
public static final String ABOOK_CHECK_API = "abookcheck-api";
public static final String CMD_MOVE_HOT_SPOT = "moveHotspot";
......@@ -36,6 +73,7 @@ public class ABookKeys {
public static final String CMD_SHOW_RELATED_CONTENT = "showRelatedContent";
public static final String CMD_PAGE_NUM = "pageNum";
public static final String CMD_GET_GROUP_TREE_INFO = "getGroupTreeInfo";
public static final String CMD_CLOSE_TASK_LIST = "closeTaskList";
public static final String GPS_TYPE = "gpsType";
public static final String STATUS_CODE = "statusCode";
......@@ -48,7 +86,22 @@ public class ABookKeys {
public static final String ATTACHED_CHANGE_FLAG = "attachedChangeFlag";
public static final String ROUTINE_TASK_FLAG = "routineTaskFlag";
public static final String UPDATE_HOTSPOT_ONLY_FLAG = "updateHotSpotOnlyFlag";
// #32782 指示者テーブル関連削除 start
//Webviewから呼び出すApiキー
public static final class CMD_KEY{
public static final String GO_SETTING = "goSetting";
public static final String GO_RELATION_CONTENT = "goRelationContent";
public static final String GO_PRINT_TARGET = "goPrintTarget";
public static final String GO_OPERATION = "goOperation";
public static final String GO_COMMUNICATION = "goCommunication";
public static final String GO_PANORAMA_EDIT = "goPanoramaEdit";
public static final String REFRESH_CONTENT = "refreshContent";
public static final String RESET_SEARCH = "resetSearch";
public static final String CHANGE_OPERATION_GROUP_MASTER = "changeOperationGroupMaster";
}
// #32782 指示者テーブル関連削除 startbtn_pano_edit
// TODO change TASK_DIRECTIONS 削除が必要
// public static final String TASK_DIRECTIONS = "taskReport";
// public static final String TASK_DIRECTIONS_SUGGEST = "taskReportSuggest";
......@@ -158,4 +211,16 @@ public class ABookKeys {
public static final String PROCESS_LIST = "processList";
public static final String MAIL_TO_URL = "mailto";
public static class SCAN_TYPE_VALUE {
public static final Integer BARCODE = 0;
public static final Integer RFID = 1;
}
public static class SCAN_TYPE_KEY {
public static final String BARCODE = "BARCODE";
public static final String RFID = "RFID";
}
public static final String SCAN_TYPE = "scanType";
}
......@@ -343,6 +343,10 @@ public class ABVDataCache {
return isServiceOptionEnable(ServiceOptionId.UsableIOReport);
}
public boolean isUsableRFIDBarcodeScan() {
return isServiceOptionEnable(ServiceOptionId.UsableRFIDBarcodeScan);
}
/**
* @version 1.2.300
* サービスオプション(ユーザパスワードソルト付加)返す
......
......@@ -19,7 +19,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public class DBConnector {
private static volatile DBConnector dbConnector = null;
public static final String DatabaseName = "ABVJE";
public static final int DatabaseVersion = DatabaseVersions.Ver1_2_362;
public static final int DatabaseVersion = DatabaseVersions.Ver1_4_0;
protected SQLiteDatabase db = null;
......
......@@ -6,6 +6,7 @@ public class DatabaseVersions {
public static final int Ver1_1_0 = 11;
public static final int Ver1_2_0 = 21;
public static final int Ver1_2_3 = 22;
public static final int Ver1_4_0 = 42;
//連続作業機能追加
public static final int Ver1_2_360 = 23;
//チャット機能追加(1.2.360障害対応。)
......
......@@ -45,6 +45,10 @@ public class OperationDao extends AbstractDao {
if (column != -1) {
dto.operationEndDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMdd_hyphen);
}
column = cursor.getColumnIndex("operation_open_date");
if (column != -1) {
dto.operationOpenDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
column = cursor.getColumnIndex("operation_type");
if (column != -1) {
dto.operationType = cursor.getInt(column);
......@@ -116,6 +120,21 @@ public class OperationDao extends AbstractDao {
dto.quickReport = cursor.getInt(column);
}
column = cursor.getColumnIndex("permit_code");
if (column != -1) {
dto.permitCode = cursor.getString(column);
}
column = cursor.getColumnIndex("permit_code_required_flg");
if (column != -1) {
dto.permitCodeRequiredFlg = cursor.getInt(column);
}
column = cursor.getColumnIndex("display_permission_flg ");
if (column != -1) {
dto.displayPermissionFlg = cursor.getInt(column);
}
return dto;
}
......@@ -191,15 +210,18 @@ public class OperationDao extends AbstractDao {
+ "enable_report_history, "
+ "enable_report_edit,"
+ "enable_add_report,"
+ "quick_report) "
+ "quick_report,"
+ "permit_code,"
+ "permit_code_required_flg, "
+ "display_permission_flg) "
+ "values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
dto.getInsertValues());
}
public boolean update(OperationDto dto) {
long count = update("update t_operation "
+ "set "
long count = update("UPDATE t_operation "
+ "SET "
+ "operation_name=?, "
+ "operation_descriptions=?, "
+ "operation_start_date=?, "
......@@ -215,8 +237,11 @@ public class OperationDao extends AbstractDao {
+ "enable_report_history=?, "
+ "enable_report_edit=?, "
+ "enable_add_report=?, "
+ "quick_report=? "
+ "where operation_id=?",
+ "quick_report=?, "
+ "permit_code=?, "
+ "permit_code_required_flg=?, "
+ "display_permission_flg=? "
+ "WHERE operation_id=?",
dto.getUpdateValues());
return count > 0;
}
......@@ -265,8 +290,8 @@ public class OperationDao extends AbstractDao {
* @param operationSortType
* @return
*/
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortType) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, operationSortType, null);
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortType, int operationGroupMasterId) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, operationSortType, Integer.valueOf(operationGroupMasterId) == 0 ? null : Integer.valueOf(operationGroupMasterId));
return rawQueryGetDtoList(sql, null, OperationDto.class);
}
......@@ -301,6 +326,7 @@ public class OperationDao extends AbstractDao {
sql.append(" top.operation_descriptions, ");
sql.append(" top.operation_start_date, ");
sql.append(" top.operation_end_date, ");
sql.append(" top.operation_open_date, ");
sql.append(" top.last_edit_date, ");
sql.append(" top.edit_lock_flg, ");
sql.append(" top.need_sync_flg, ");
......@@ -310,6 +336,8 @@ public class OperationDao extends AbstractDao {
sql.append(" top.enable_report_update, ");
sql.append(" top.enable_report_edit, ");
sql.append(" top.enable_add_report, ");
sql.append(" top.permit_code, ");
sql.append(" top.permit_code_required_flg, ");
sql.append(" CASE ");
sql.append(" WHEN report_type = 1 THEN ( ");
sql.append(" SELECT strftime('%Y/%m/%d %H:%M', datetime(ttr.report_start_date, 'localtime')) || ' ~ ' || strftime('%Y/%m/%d %H:%M', datetime(ttr.report_end_date, 'localtime')) ");
......
......@@ -10,6 +10,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.GroupDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.NumericUtil;
......@@ -51,7 +52,10 @@ public class OperationGroupMasterDao extends AbstractDao {
if (column != -1) {
dto.operationCount = cursor.getInt(column);
}
column = cursor.getColumnIndex("tree_path");
if (column != -1) {
dto.treePath = cursor.getString(column);
}
return dto;
}
......@@ -185,4 +189,25 @@ public class OperationGroupMasterDao extends AbstractDao {
public Integer getLastGroupLevel() {
return rawQueryGetInt("SELECT MAX(operation_group_master_level) FROM m_operation_group_master", null);
}
public List<OperationGroupMasterDto> getOperationGroupMasterTreeData() {
return rawQueryGetDtoList("WITH RECURSIVE paths(operation_group_master_id, tree_path) AS (\n" +
" SELECT operation_group_master_id, operation_group_master_id\n" +
" FROM m_operation_group_master AS nodes\n" +
" WHERE parent_operation_group_master_id = 0\n" +
" UNION\n" +
" SELECT nodes.operation_group_master_id, paths.tree_path || '/' || nodes.operation_group_master_id\n" +
" FROM m_operation_group_master AS nodes\n" +
" JOIN paths\n" +
" WHERE nodes.parent_operation_group_master_id = paths.operation_group_master_id\n" +
")\n" +
"SELECT m.*, paths.tree_path, COUNT(r.operation_id) count_operation\n" +
"FROM paths\n" +
" JOIN m_operation_group_master AS m\n" +
" ON paths.operation_group_master_id = m.operation_group_master_id\n" +
" LEFT JOIN r_operation_group_master_relation r\n" +
" ON paths.operation_group_master_id = r.operation_group_master_id\n" +
"GROUP BY m.operation_group_master_id\n" +
"ORDER By m.operation_group_master_name ASC", null, OperationGroupMasterDto.class);
}
}
\ No newline at end of file
......@@ -86,4 +86,8 @@ public class OperationGroupMasterOperationDao extends AbstractDao {
public List<Integer> getOperationGroupMasterIds(Long operationId) {
return rawQueryGetIntegerList("select operation_group_master_id from r_operation_group_master_relation where operation_id=?", new String[]{""+ operationId});
}
public List<OperationGroupMasterRelationDto> getAllGroupMasterRelation() {
return rawQueryGetDtoList("select * from r_operation_group_master_relation", null, OperationGroupMasterRelationDto.class);
}
}
\ No newline at end of file
......@@ -137,4 +137,6 @@ public class PushMessageDao extends AbstractDao {
Logger.v(TAG, "sql=%s", sql);
return rawQueryGetDto(sql.toString(), args, PushMessageDto.class);
}
}
......@@ -40,6 +40,9 @@ public class TOperation extends SQLiteTableScript {
sql.append(" , enable_add_report SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , operation_open_date DATETIME ");
sql.append(" , quick_report SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , permit_code TEXT ");
sql.append(" , display_permission_flg SMALLINT");
sql.append(" , permit_code_required_flg SMALLINT");
sql.append(" , PRIMARY KEY (operation_id) ");
sql.append(" ) ");
ddl.add(sql.toString());
......@@ -58,6 +61,11 @@ public class TOperation extends SQLiteTableScript {
if (oldVersion < DatabaseVersions.Ver1_2_3) {
ddl.add("ALTER TABLE t_operation ADD COLUMN quick_report SMALLINT NOT NULL DEFAULT 0 ");
}
if (oldVersion < DatabaseVersions.Ver1_4_0) {
ddl.add("ALTER TABLE t_operation ADD COLUMN permit_code TEXT ");
ddl.add("ALTER TABLE t_operation ADD COLUMN permit_code_required_flg SMALLINT ");
ddl.add("ALTER TABLE t_operation ADD COLUMN display_permission_flg SMALLINT ");
}
return ddl;
}
......
......@@ -15,6 +15,7 @@ public class OperationDto extends AbstractDto {
public String operationDescriptions;
public Date operationStartDate;
public Date operationEndDate;
public Date operationOpenDate;
public Date lastEditDate;
public boolean editLockFlg;
public boolean needSyncFlg;
......@@ -32,6 +33,9 @@ public class OperationDto extends AbstractDto {
public int enableReportEdit; // 作業編集可能区分
public int enableAddReport; // 作業追加区分
public int quickReport; // 簡易帳票区分
public String permitCode; // 許可スキャンコード
public int permitCodeRequiredFlg; // 許可スキャン必須フラグ
public int displayPermissionFlg;
public List<OperationGroupMasterRelationDto> operationGroupMasterRelationDtoList; // 作業種別に紐づく作業Dto
......@@ -49,12 +53,12 @@ public class OperationDto extends AbstractDto {
@Override
public Object[] getInsertValues() {
return new Object[] { operationId, operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport };
return new Object[] { operationId, operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport, permitCode, permitCodeRequiredFlg, displayPermissionFlg};
}
@Override
public Object[] getUpdateValues() {
return new Object[] { operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport, operationId };
return new Object[] { operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport, permitCode, permitCodeRequiredFlg, displayPermissionFlg, operationId };
}
@Override
......
......@@ -12,6 +12,7 @@ public class OperationGroupMasterDto extends AbstractDto {
public int parentOperationGroupMasterId; // 作業種別の親階層ID
public int operationGroupMasterLevel; // 作業種別の階層レベル
public int operationCount = 0; // 作業種別に紐づく作業数
public String treePath ; // 作業種別のTreeデータ
public OperationGroupMasterDto() {
}
......
package jp.agentec.abook.abv.bl.logic;
import org.json.adf.JSONArray;
import org.json.adf.JSONObject;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
......@@ -10,15 +13,19 @@ import jp.agentec.abook.abv.bl.acms.client.json.OperationGroupMasterJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters;
import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
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.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterDao;
import jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterOperationDao;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.abook.abv.bl.dto.comparator.OperationGroupMasterLevelComparator;
import jp.agentec.adf.util.FileUtil;
/**
* Created by leej on 2019/06/26.
......@@ -28,6 +35,7 @@ public class OperationGroupMasterLogic extends AbstractLogic {
private static final String TAG = "OperationGroupMasterLogic";
private OperationGroupMasterDao mOperationGroupMasterDao = AbstractDao.getDao(OperationGroupMasterDao.class);
private OperationGroupMasterOperationDao mOperationGroupMasterOperationDao = AbstractDao.getDao(OperationGroupMasterOperationDao.class);
private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class);
/**
......@@ -168,4 +176,46 @@ public class OperationGroupMasterLogic extends AbstractLogic {
public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId, OperationSortingType operationSortingType) {
return mOperationDao.getOperationsByGroupMasterId(operationGroupMasterId, operationSortingType);
}
public void createOperationGroupMasterListJson(String filePath) {
List<OperationGroupMasterDto> localOperationGroupMasterDtos = mOperationGroupMasterDao.getOperationGroupMasterTreeData();
JSONObject operationListJsonObject = new JSONObject();
try {
JSONArray operationJsonArray = new JSONArray();
for (int i = 0; i < localOperationGroupMasterDtos.size(); i++) {
JSONObject operationJson = new JSONObject();
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_ID, localOperationGroupMasterDtos.get(i).operationGroupMasterId);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_NAME, localOperationGroupMasterDtos.get(i).operationGroupMasterName);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_LEVEL, localOperationGroupMasterDtos.get(i).operationGroupMasterLevel);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_PARENTID, localOperationGroupMasterDtos.get(i).parentOperationGroupMasterId);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_TREEPATH, localOperationGroupMasterDtos.get(i).treePath);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_COUNTOPERATION, localOperationGroupMasterDtos.get(i).operationCount);
operationJsonArray.put(operationJson);
}
operationListJsonObject.put(ABookKeys.OPERATION_GROUPMASTER_LIST, operationJsonArray);
FileUtil.createFile(filePath + "/" + ABookKeys.OPERATION_GROUPMASTER_LIST + ".json", operationListJsonObject.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
public void createOperationGroupMasterRelationListJson(String filePath) {
List<OperationGroupMasterRelationDto> operationList = mOperationGroupMasterOperationDao.getAllGroupMasterRelation();
JSONObject operationListJsonObject = new JSONObject();
try {
JSONArray operationJsonArray = new JSONArray();
for (int i = 0; i < operationList.size(); i++) {
JSONObject operationJson = new JSONObject();
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_RELATION_MASTERID, operationList.get(i).operationGroupMasterId);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_RELATION_OPERATIONID, operationList.get(i).operationId);
operationJsonArray.put(operationJson);
}
operationListJsonObject.put(ABookKeys.OPERATION_GROUPMASTER_RELATION_LIST, operationJsonArray);
FileUtil.createFile(filePath + "/" + ABookKeys.OPERATION_GROUPMASTER_RELATION_LIST + ".json", operationListJsonObject.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
......@@ -58,6 +58,7 @@ import jp.agentec.abook.abv.bl.dto.CategoryContentDto;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.dto.TaskDto;
......@@ -132,9 +133,6 @@ public class OperationLogic extends AbstractLogic {
}
}
for (OperationDto serverOperationDto : serverOperations) {
// 登録フラグ
boolean insertFlg = true;
......@@ -1328,9 +1326,9 @@ public class OperationLogic extends AbstractLogic {
* @param operationSortingType ソート順
* @return 作業リスト
*/
public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortingType) {
public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortingType, int operationGroupMasterId) {
List<OperationDto> operationDtoList;
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, operationSortingType);
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, operationSortingType, operationGroupMasterId);
for (OperationDto operationDto : operationDtoList) {
// 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット
if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) {
......@@ -1997,4 +1995,42 @@ public class OperationLogic extends AbstractLogic {
}
return isSuccess;
}
public String createOperationListJson(List<OperationDto> operationList, String filePath) {
JSONObject operationListJsonObject = new JSONObject();
try {
JSONArray operationJsonArray = new JSONArray();
for (int i = 0; i < operationList.size(); i++) {
JSONObject operationJson = new JSONObject();
operationJson.put(ABookKeys.OPERATION_ID, operationList.get(i).operationId);
operationJson.put(ABookKeys.OPERATION_NAME, operationList.get(i).operationName);
operationJson.put(ABookKeys.OPERATION_DESCRIPTIONS, operationList.get(i).operationDescriptions);
operationJson.put(ABookKeys.OPERATION_TYPE, operationList.get(i).operationType);
operationJson.put(ABookKeys.OPERATION_START_DATE, DateTimeUtil.toString(operationList.get(i).operationStartDate, DateTimeFormat.yyyyMMdd_slash));
operationJson.put(ABookKeys.OPERATION_END_DATE, DateTimeUtil.toString(operationList.get(i).operationEndDate, DateTimeFormat.yyyyMMdd_slash));
operationJson.put(ABookKeys.LAST_EDIT_DATE, DateTimeUtil.toString(operationList.get(i).lastEditDate, DateTimeFormat.yyyyMMdd_slash));
operationJson.put(ABookKeys.NEED_SYNC_FLG, operationList.get(i).needSyncFlg);
operationJson.put(ABookKeys.REPORT_TYPE, operationList.get(i).reportType);
operationJson.put(ABookKeys.REPORT_CYCLE, operationList.get(i).reportCycle);
operationJson.put(ABookKeys.ENABLE_REPORT_UPDATE, operationList.get(i).enableReportUpdate);
operationJson.put(ABookKeys.ENABLE_REPORT_HISTORY, operationList.get(i).enableReportHistory);
operationJson.put(ABookKeys.ENABLE_ADD_REPORT, operationList.get(i).enableAddReport);
operationJson.put(ABookKeys.QUICK_REPORT, operationList.get(i).quickReport);
operationJson.put(ABookKeys.PERMIT_CODE, operationList.get(i).permitCode);
operationJson.put(ABookKeys.PERMIT_CODE_REQUIRED_FLG, operationList.get(i).permitCodeRequiredFlg);
operationJson.put(ABookKeys.OPERATION_OPEN_DATE, DateTimeUtil.toString(operationList.get(i).operationOpenDate, DateTimeFormat.yyyyMMddHHmmss_hyphen));
operationJson.put(ABookKeys.DISPLAY_PERMISSION_FLG, operationList.get(i).displayPermissionFlg);
operationJson.put(ABookKeys.CONTENT_ID, operationList.get(i).contentId);
operationJsonArray.put(operationJson);
}
operationListJsonObject.put(ABookKeys.OPERATION_LIST, operationJsonArray);
if (!StringUtil.isNullOrEmpty(filePath)) {
FileUtil.createFile(filePath + "/operationList.json", operationListJsonObject.toString());
}
} catch (Exception e) {
e.printStackTrace();
}
return operationListJsonObject.toString();
}
}
package jp.agentec.abook.abv.bl.logic;
import org.json.adf.JSONArray;
import org.json.adf.JSONObject;
import java.io.IOException;
import java.util.List;
......@@ -14,7 +17,9 @@ import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.PushMessageDao;
import jp.agentec.abook.abv.bl.dto.FixPushMessageDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.adf.util.FileUtil;
/**
* Created by kim jinsung on 2018/09/17.
......@@ -62,4 +67,32 @@ public class PushMessageLogic extends AbstractLogic {
public void updateReadingFlg(long pushMessageId) {
mPushMessageDao.updateReadingFlg(pushMessageId);
}
public List<PushMessageDto> getAllPushMessage() {
return mPushMessageDao.selectAll();
}
public void createOperationPushMessageListJson(String filePath) {
List<PushMessageDto> pushList = getAllPushMessage();
JSONObject pushListJsonObject = new JSONObject();
try {
JSONArray pushJsonArray = new JSONArray();
for (int i = 0; i < pushList.size(); i++) {
JSONObject pushJson = new JSONObject();
pushJson.put(ABookKeys.OPERATION_PUSHMESSAGEID, pushList.get(i).pushMessageId);
pushJson.put(ABookKeys.OPERATION_OPERATIONID, pushList.get(i).operationId);
pushJson.put(ABookKeys.OPERATION_OPERATIONNAME, pushList.get(i).operationName);
pushJson.put(ABookKeys.OPERATION_PUSHSENDLOGINID, pushList.get(i).pushSendLoginId);
pushJson.put(ABookKeys.OPERATION_PUSHSENDDATE, pushList.get(i).pushSendDate);
pushJson.put(ABookKeys.OPERATION_PUSHMESSAGE, pushList.get(i).pushMessage);
pushJson.put(ABookKeys.OPERATION_READINGFLG, pushList.get(i).readingFlg);
pushJsonArray.put(pushJson);
}
pushListJsonObject.put(ABookKeys.OPERATION_PUSHMESSAGE_LIST, pushJsonArray);
FileUtil.createFile(filePath + "/" + ABookKeys.OPERATION_PUSHMESSAGE_LIST + ".json", pushListJsonObject.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
......@@ -235,7 +235,9 @@
<!-- ABookCheck対応 -->
<activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationListActivity"
android:configChanges="keyboardHidden|orientation|screenSize"/>
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
android:resizeableActivity="true"
android:windowSoftInputMode="adjustPan"/>
<activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity"
android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationMeetingListActivity"/>
......
Subproject commit 9ecee0d315a72826655fb964234d2271134482b2
Subproject commit 0ab4d25517492c845bcfceaceaf86797eff822cc
Subproject commit 5d0e71bd7ff6383baab4a0f7f333279b7307a27a
......@@ -238,6 +238,7 @@
<string name="L122">現在、この機能はAndroid版アプリでは\n対応しておりません。</string>
<string name="L123">この資料の表示は制限されています。\nパスワードの入力が必要です。</string>
<string name="L124">システムエラーが発生しました。アプリをリロードします。</string>
<string name="L125">その作業は非公開または削除されました。更新を行って下さい。</string>
<string name="C_E_SYSTEM_0001">予期せぬ問題が発生しました。</string>
<string name="C_E_SYSTEM_0002">ログインできませんでした。(暗号化失敗 0002)</string>
......@@ -1490,6 +1491,8 @@
<string name="msg_destroy_exist_collaboration">進行中の協業が存在します。既存協業を終了し、新しい協業を開始してもよろしいですか</string>
<string name="not_found_camera">利用可能なカメラを見つかりませんでした。</string>
<string name="error_fail_record">レコーディングに失敗しました。管理者にお問い合わせしてください。</string>
<string name="chat_open_fail_meeting_connected">遠隔支援中にはチャットルームは開けません。</string>
<string name="chat_open_fail_collaborattion_connected">協業中にはチャットルームは開けません。</string>
<!-- 連続作業 -->
<string name="msg_error_all_process_delete">全削除の送信に失敗しました。</string>
<string name="msg_ozd_file_could_not_opened">帳票ファイルを開くことができませんでした。</string>
......
......@@ -239,6 +239,7 @@
<string name="L122">현재 이 기능은 Android 버전 앱에서 \n 대응하고 있지 않습니다.</string>
<string name="L123">표시가 제한된 컨텐츠 입니다.\n로그인 패스워드를 입력해 주세요.</string>
<string name="L124">시스템에러가 발생하였습니다.앱을 리로드합니다.</string>
<string name="L125">해당 자료가 비공개 또는 삭제되었습니다. 갱신해 주세요.</string>
<string name="C_E_SYSTEM_0001">예기치 않은 오류가 발생하였습니다.</string>
<string name="C_E_SYSTEM_0002">로그인 할 수 없습니다.(암호화 실패 0002)</string>
......@@ -1498,6 +1499,8 @@
<string name="not_found_camera">사용 가능한 카메라 기기를 찾을수 없습니다.</string>
<string name="msg_destroy_exist_collaboration">진행중인 협업이 존재합니다. 기존 협업을 종료하고 새로운 협업을 시작 하시겠습니까?</string>
<string name="error_fail_record">레코드에 실패했습니다. 관리자에게 문의해주세요.</string>
<string name="chat_open_fail_meeting_connected">원격 지원 접속 중에는 채팅방을 열 수 없습니다.</string>
<string name="chat_open_fail_collaborattion_connected">문서협업 접속 중에는 채팅방을 열수 없습니다.</string>
<!-- Communication 会議室 -->
<string name="msg_error_favorites_100_over">즐겨찾기는 최대 100개까지 입니다.</string>
<string name="msg_eroor_network_offline">연결된 네트워크가 없습니다.</string>
......
......@@ -238,7 +238,7 @@
<string name="L122">Currently, this feature is not supported in the version of the App Android.</string>
<string name="L123">These content are limited.\nThe input of the password is necessary.</string>
<string name="L124">System error occurred. Will reload the application.</string>
<string name="L125">The working was closed or deleted.Please update the working.</string>
<string name="C_E_SYSTEM_0001">Contingency has occurred.</string>
<string name="C_E_SYSTEM_0002">App can not login.(Encryption failures 0002)</string>
<string name="C_E_SYSTEM_0003">App can not login.(Library initialization Failed)</string>
......@@ -1495,6 +1495,8 @@
<string name="not_found_camera">Not found camera device.</string>
<string name="msg_destroy_exist_collaboration">Ongoing collaboration exist. Do you want to terminate exist collaboration and start new?</string>
<string name="error_fail_record">Recording failed. Please contact the administrator.</string>
<string name="chat_open_fail_meeting_connected">Can’t open chat room during distance support. </string>
<string name="chat_open_fail_collaborattion_connected">Chat rooms cannot be opened while the document collaboration is connected.</string>
<!-- Communication 会議室 -->
<string name="msg_error_favorites_100_over">You can have up to 100 favorites.</string>
<string name="msg_eroor_network_offline">There is no network connected.</string>
......
......@@ -11,7 +11,7 @@
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical" >
<jp.agentec.abook.abv.ui.home.view.ChatWebView
<WebView
android:id="@+id/chatWebview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
......
......@@ -142,6 +142,20 @@
android:background="@drawable/btn_view_sub_menu" />
<ImageButton
android:id="@+id/btn_operation_print"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_operation_print_white"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:scaleX="0.6"
android:scaleY="0.6"
style="@style/ToolBarIcon"
android:layout_marginRight="50dp"
android:visibility="gone" />
<ImageButton
android:id="@+id/btn_show_task_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -969,7 +969,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
*/
protected final void setHeaderScroll(int value) {
if (DEBUG) {
Log.d(LOG_TAG, "setHeaderScroll: " + value);
Log.v(LOG_TAG, "setHeaderScroll: " + value);
}
// Clamp value to with pull scroll range
......
package jp.agentec.abook.abv.cl.push;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.util.Log;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import org.json.adf.JSONException;
import org.json.adf.JSONObject;
import java.util.Map;
import java.util.Objects;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.ChatMessageDto;
import jp.agentec.abook.abv.bl.dto.MemberInfoDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.UserAuthenticateLogic;
import jp.agentec.abook.abv.cl.util.AppUtil;
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.ShowPushMessageDailogActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
import jp.agentec.abook.abv.ui.home.activity.SplashScreenActivity;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.viewer.activity.AudioPlayActivity;
import jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.VideoViewActivity;
import jp.agentec.adf.util.StringUtil;
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() {
......@@ -51,146 +62,117 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Map<String, String> msg = remoteMessage.getData();
Map<String, String> messageMap = remoteMessage.getData();
Logger.d(TAG,"onMessageReceived(): msg :"+ msg);
Logger.d(TAG,"onMessageReceived(): messageMap :"+ messageMap);
try {
UserAuthenticateLogic logic = AbstractLogic.getLogic(UserAuthenticateLogic.class);
MemberInfoDto memberInfo = logic.getMemberInfo();
if (!StringUtil.isNullOrWhiteSpace(msg.get(AppDefType.PushMessageKey.message)) && this.getResources().getInteger(R.integer.push_message) == 1 && memberInfo != null) {
boolean hasMessageBody = !StringUtil.isNullOrWhiteSpace(messageMap.get(AppDefType.PushMessageKey.message));
boolean isPushMessageEnabled = this.getResources().getInteger(R.integer.push_message) == 1;
if (hasMessageBody && isPushMessageEnabled && memberInfo != null) {
// Check pushmessage by chat
String tempMsg = msg.get(AppDefType.PushMessageKey.message);
String pushMsg = "";
Long roomId = null;
String messageBody = messageMap.get(AppDefType.PushMessageKey.message);
String roomName = "";
String pushSendLoginId = "";
long pushSendDate = 0;
Integer insertId = 0;
Integer messageType = 0;
Integer messageId = 0;
String roomType = "";
Log.d(TAG,"tempMsg : "+ tempMsg);
if (tempMsg.indexOf("pushSendLoginId") > 0) {
JSONObject json = new JSONObject(tempMsg);
Object Obj = json.getString("pushSendLoginId");
roomId = json.getLong("roomId");
roomName = json.getString("roomName");
pushSendLoginId = json.getString("pushSendLoginId");
pushSendDate = json.getLong("pushSendDate");
pushMsg = json.getString("message");
if (Objects.requireNonNull(messageBody).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) > 0) {
PushMessageJSON json = new PushMessageJSON(messageBody);
roomName = json.getRoomName();
//TODO pushメッセージが到着した際、新着メッセージかルーム招待か判別してDB格納が必要
//Integer insertId = 0;
//Integer messageType = 0;
//insertId = json.getString("insertId");
//ChatMessageDto chatMessageDto = new ChatMessageDto();
//chatMessageDto.chatRoomId =
//chatRoomId shopMemberId messge messageType insertDate
if (pushMsg.length() > 0) {
tempMsg = pushMsg;
}
if (AppUtil.isAppForground(this)) {
msg.put(AppDefType.PushMessageKey.message, pushMsg);
}
if (pushMsg.contains(INVITE_COLLABORATION)) {
roomType = Integer.toString(json.getInt("roomType"));
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]);
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
startActivity(pushMsgDialog);
return;
}
}
if (AppUtil.isAppForground(this)) {
Intent pushMsgDialog = new Intent(ABVFcmListenerService.this, ShowPushMessageDailogActivity.class);
pushMsgDialog.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, tempMsg);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.data, msg.get(AppDefType.PushMessageKey.data));
pushMsgDialog.putExtra(AppDefType.PushMessageKey.operationId, msg.get(AppDefType.PushMessageKey.operationId));
// push message
if (roomName.length() > 0) {
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);
showChatRoomPopupMessage(messageMap);
} else {
String data = messageMap.get(AppDefType.PushMessageKey.data);
String operationID = messageMap.get(AppDefType.PushMessageKey.operationId);
showOperationPopUpMessage(messageBody, data, operationID);
}
startActivity(pushMsgDialog);
} else {
sendNotification(msg);
sendNotification(messageMap);
}
}
} catch (ABVException e) {
// ignore
Logger.e(TAG, e.toString());
} catch (JSONException e) {
Logger.e(TAG, e.toString());
}
}
private void sendNotification(Map<String, String> message) {
Intent intent = new Intent();
// 定期点検用
if (message.get(AppDefType.PushMessageKey.operationId) != null) {
intent.putExtra(AppDefType.PushMessageKey.operationId, message.get(AppDefType.PushMessageKey.operationId));
intent.putExtra(AppDefType.PushMessageKey.message, message.get(AppDefType.PushMessageKey.message));
} else {
// Check pushmessage by chat
try {
// チャットプッシュメッセージがある場合
UserAuthenticateLogic logic = AbstractLogic.getLogic(UserAuthenticateLogic.class);
MemberInfoDto memberInfo = logic.getMemberInfo();
if (!StringUtil.isNullOrWhiteSpace(message.get(AppDefType.PushMessageKey.message))) {
String tempMsg = message.get(AppDefType.PushMessageKey.message);
String pushMsg = "";
Long roomId = null;
String roomName = "";
String pushSendLoginId = "";
long pushSendDate = 0;
Log.d(TAG,"tempMsg : "+ tempMsg);
if (tempMsg.indexOf("pushSendLoginId") > 0) {
JSONObject json = new JSONObject(tempMsg);
Object Obj = json.getString("pushSendLoginId");
roomId = json.getLong("roomId");
roomName = json.getString("roomName");
pushSendLoginId = json.getString("pushSendLoginId");
pushSendDate = json.getLong("pushSendDate");
pushMsg = json.getString("message");
message.put(AppDefType.PushMessageKey.message, pushMsg);
/**
* プッシュメッセージをダイアログ表示する
* @param messageMap 受信したメッセージを格納したMapオブジェクト
*/
private void showChatRoomPopupMessage(Map<String, String> messageMap) {
String messageBody = messageMap.get(AppDefType.PushMessageKey.message);
PushMessageJSON json;
if (StringUtil.isNullOrEmpty(messageBody)) {
return;
}
json = new PushMessageJSON(messageBody);
// push message
if (roomName.length() > 0) {
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId); // Room Id
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName); // Room Name
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, pushSendLoginId); // sendLoginId
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, pushSendDate);
Activity currentActivity = ActivityHandlingHelper.getInstance().getCurrentActivity();
if (currentActivity.getClass().equals(ChatWebViewActivity.class)) {
ChatWebViewActivity chatWebViewActivity = (ChatWebViewActivity) currentActivity;
if (chatWebViewActivity.getRoomID().equals(json.getRoomId())) {
// push messageと同じ部屋にいる場合はpushmessageを送信しない。
return;
}
}
String baseActivityName = currentActivity.getClass().getName();
if (currentActivity.getClass().equals(HTMLWebViewActivity.class) ||
currentActivity.getClass().equals(ContentViewActivity.class) ||
currentActivity.getClass().equals(OperationRelatedContentActivity.class) ||
currentActivity.getClass().equals(OperationListActivity.class) ||
currentActivity.getClass().equals(ImageViewActivity.class) ||
currentActivity.getClass().equals(VideoViewActivity.class) ||
currentActivity.getClass().equals(AudioPlayActivity.class)
){
// 呼び出し元のActivityの名前をmessageMapに追加する
messageMap.put(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
messageMap.put(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen, "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()));
pushMsgDialog.putExtra(AppDefType.PushMessageKey.data, json.getData());
pushMsgDialog.putExtra(AppDefType.PushMessageKey.operationId, json.getOperationID());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomId, json.getRoomId());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomName, json.getRoomName());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, json.getPushSendLoginId());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, json.getPushSendDate());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomType, json.getRoomType());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.collaborationType, json.getCollaborationType());
startActivity(pushMsgDialog);
}
} catch (ABVException e) {
// ignore
Logger.e(TAG, e.toString());
}
private void showOperationPopUpMessage(String textMessage, String data, String operationID) {
Intent pushMsgDialog = new Intent(ABVFcmListenerService.this, ShowPushMessageDailogActivity.class);
pushMsgDialog.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, textMessage);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.data, data);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.operationId, operationID);
startActivity(pushMsgDialog);
}
intent.setClassName(getApplicationContext(), SplashScreenActivity.class.getName());
/**
* アプリがバックグラウンドなので通知エリアにアイコン表示する。
* アイコンタップ時の情報を作成する。
*/
private void sendNotification(Map<String, String> message) {
Intent intent = instantiatePushNotificationIntent(message);
Notification notification;
......@@ -205,7 +187,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
mNotificationManager.notify(uniqueId, notification);
}
} else {
//mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
Notification.Builder nb = getNotificationBuilder(pendingIntent, message);
......@@ -229,14 +210,68 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
}
}
Intent instantiatePushNotificationIntent(Map<String, String> message) {
Intent intent = new Intent();
intent.setClassName(getApplicationContext(), SplashScreenActivity.class.getName());
// 定期点検用
if (message.get(AppDefType.PushMessageKey.operationId) != null) {
intent.putExtra(AppDefType.PushMessageKey.operationId, message.get(AppDefType.PushMessageKey.operationId));
intent.putExtra(AppDefType.PushMessageKey.message, message.get(AppDefType.PushMessageKey.message));
return intent;
}
// Check pushmessage by chat
// チャットプッシュメッセージがある場合
if (StringUtil.isNullOrWhiteSpace(message.get(AppDefType.PushMessageKey.message))) {
return intent;
}
String messageBody = message.get(AppDefType.PushMessageKey.message);
if (Objects.requireNonNull(messageBody).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) <= 0) {
return intent;
}
JSONObject json = new JSONObject(messageBody);
String textMessage = json.getString(AppDefType.PushMessageKey.message);
String roomType = "";
String collaborationType = "";
if (textMessage.contains(ABookCommConstants.INVITE_COLLABORATION)) {
roomType = Integer.toString(json.getInt(AppDefType.ChatPushMessageKey.roomType));
String[] inviteMessage = textMessage.split(ABookCommConstants.CHAT_MESSAGE_SEPERATOR);
collaborationType = inviteMessage[1];
}
String roomName = json.getString(AppDefType.ChatPushMessageKey.roomName);
String pushMsg = json.getString(AppDefType.PushMessageKey.message);
message.put(AppDefType.PushMessageKey.message, pushMsg);
if (roomName.length() <= 0) {
return intent;
}
long roomId = json.getLong(AppDefType.ChatPushMessageKey.roomId);
long pushSendDate = json.getLong(AppDefType.ChatPushMessageKey.pushSendDate);
String pushSendLoginId = json.getString(AppDefType.ChatPushMessageKey.pushSendLoginId);
String collaobrationInvitedMessage = getContentText(textMessage);
intent.putExtra(AppDefType.PushMessageKey.message, collaobrationInvitedMessage);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, pushSendLoginId);
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, pushSendDate);
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, collaborationType);
return intent;
}
private Notification.Builder getNotificationBuilder(PendingIntent pendingIntent, Map<String, String> message) {
String txtMessage = getContentText(message.get(AppDefType.PushMessageKey.message));
return new Notification.Builder(this)
.setDefaults(Notification.DEFAULT_ALL)
.setSmallIcon(R.drawable.icon)
.setWhen(System.currentTimeMillis())
.setAutoCancel(true)
.setContentTitle(getString(R.string.app_name))
.setContentText(message.get(AppDefType.PushMessageKey.message))
.setContentText(txtMessage)
.setContentIntent(pendingIntent);
}
......@@ -248,5 +283,15 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
return downloadUrl;
}
/**
* 通知エリアに表示するテキストを決定する
* @param textMessage プッシュメッセージをJSONOjbcetにした時の、AppDefType.PushMessageKey.message の値
* @return 表示するテキスト
*/
private String getContentText(String textMessage) {
if (!StringUtil.isNullOrEmpty(textMessage) && textMessage.contains(ABookCommConstants.INVITE_COLLABORATION)) {
return getString(R.string.msg_invite_collaboration);
}
return textMessage;
}
}
package jp.agentec.abook.abv.cl.push;
import android.content.Intent;
import org.json.adf.JSONObject;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.adf.util.StringUtil;
/**
* プッシュメッセージを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 {
int roomType = jsonObject.getInt(AppDefType.ChatPushMessageKey.roomType);
return Integer.toString(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 boolean isCollaboration() {
String message = getMessage();
if (message.contains(ABookCommConstants.INVITE_COLLABORATION)) {
return true;
}
return false;
}
public String getCollaborationType() {
try {
String message = getMessage();
if (message.contains(ABookCommConstants.INVITE_COLLABORATION)) {
String[] inviteMessage = message.split(ABookCommConstants.CHAT_MESSAGE_SEPERATOR);
return inviteMessage[1];
}
return jsonObject.getString(AppDefType.ChatPushMessageKey.collaborationType);
} catch (Exception e) {
return "";
}
}
}
......@@ -264,35 +264,39 @@ public class ChatData {
public void joinCollaboration(String collaborationType, String meetingId) throws NetworkDisconnectedException, AcmsException {
joinMeetingId = Integer.parseInt(meetingId);
collaborationJoinFlg = ABookCommConstants.FLAG.COLLABORATION_JOIN_FLG.JOIN;
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
joinCollaboration(sid, roomId.intValue());
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.joinCollaboration(sid, roomId.intValue());
}
public void joinChangedCollaboration(String collaborationType, String meetingId) throws NetworkDisconnectedException, AcmsException {
joinMeetingId = Integer.parseInt(meetingId);
collaborationJoinFlg = ABookCommConstants.FLAG.COLLABORATION_JOIN_FLG.JOIN;
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
joinCollaboration(sid, roomId.intValue());
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.joinCollaboration(sid, roomId.intValue());
}
public void inviteCollaboration(String inviteUserIds, String collaborationType) throws NetworkDisconnectedException, AcmsException {
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
inviteCollaboration(sid, roomId.intValue(), roomName, inviteUserIds, collaborationType);
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.inviteCollaboration(sid, roomId.intValue(), roomName, inviteUserIds, collaborationType);
}
public void finishCollaboration() throws NetworkDisconnectedException, AcmsException {
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
finishCollaboration(sid, roomId.intValue());
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.finishCollaboration(sid, roomId.intValue());
}
public void finishAllCollaboration() throws NetworkDisconnectedException, AcmsException {
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
finishAllCollaboration(sid, roomId.intValue());
try {
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.finishAllCollaboration(sid, roomId.intValue());
} catch (AcmsException e) {
e.printStackTrace();
}
}
private void updateFavoriteUser() throws NetworkDisconnectedException, AcmsException {
GetFavoriteUserJSON resultJson = AcmsClient
......
......@@ -104,7 +104,7 @@ public abstract class ABVActivity extends Activity {
public static final String URL = "url";
public static final String MESSAGE = "message";
public static final String PASSWORD = "password";
public Runnable mCallBack;
protected static final int FP = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
protected static final int WC = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
protected static final int R_FP = ViewGroup.LayoutParams.MATCH_PARENT;
......@@ -198,6 +198,10 @@ public abstract class ABVActivity extends Activity {
catch (Exception e) {
Logger.e(TAG, "_closeProgressPopup error. progressDialogHorizontal error = " +e.toString());
}
if (mCallBack != null) {
mCallBack.run();
mCallBack = null;
}
}
}
......
package jp.agentec.abook.abv.ui.common.activity;
import android.app.Activity;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
......@@ -30,6 +31,7 @@ import com.google.firebase.iid.FirebaseInstanceId;
import java.io.FileNotFoundException;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
......@@ -40,6 +42,7 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.Constant.AlertMessageLevel;
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.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
......@@ -67,6 +70,7 @@ import jp.agentec.abook.abv.bl.logic.MemoLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.bl.logic.UserAuthenticateLogic;
import jp.agentec.abook.abv.cl.helper.ABVUncaughtExceptionHandler;
import jp.agentec.abook.abv.cl.push.PushMessageJSON;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.cl.util.StorageUtil;
import jp.agentec.abook.abv.launcher.android.ABVApplication;
......@@ -87,9 +91,11 @@ import jp.agentec.abook.abv.ui.common.util.KeyboardUtils;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView;
import jp.agentec.abook.abv.ui.common.vo.Size;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.activity.HelpActivity;
import jp.agentec.abook.abv.ui.home.activity.LoginActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
import jp.agentec.abook.abv.ui.home.adapter.FixPushMessageAdapter;
import jp.agentec.abook.abv.ui.home.adapter.OperationSelectAdapter;
import jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter;
......@@ -158,6 +164,10 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
int PAYMENT = 3;
}
// 遷移元のアクティビティ名
// PushMessage受信時に直接ChatRoomへ行かずに、ひとつまえのActivityに戻る為に使用する。
public String baseActivityName;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -808,6 +818,10 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
* コミュニケーションメニューダイアログ
*/
public void showCommunicationMenuDialog() {
if (mCommunicationMenuDialog != null) {
// すでに作成されている場合はなにもしない
return;
}
mCommunicationMenuDialog = new Dialog(this);
mCommunicationMenuDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mCommunicationMenuDialog.setCanceledOnTouchOutside(false);
......@@ -836,7 +850,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
@Override
public void onClick(View view) {
ActivityHandlingHelper.getInstance().startMeetingActivity();
mCommunicationMenuDialog.dismiss();
finishCommunicationMenuDialog();
}
});
......@@ -845,7 +859,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
@Override
public void onClick(View view) {
showOperationSelectDialog();
mCommunicationMenuDialog.dismiss();
finishCommunicationMenuDialog();
}
});
......@@ -854,18 +868,26 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
@Override
public void onClick(View view) {
showPushMessageListDialog();
mCommunicationMenuDialog.dismiss();
finishCommunicationMenuDialog();
}
});
// chat
LinearLayout ll_menuItem_chat = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_chat);
if (ABVDataCache.getInstance().serviceOption.isChat()) {
final Activity baseActivity = this;
ll_menuItem_chat.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity();
mCommunicationMenuDialog.dismiss();
// 戻り先
String targetActivityName;
if (baseActivity instanceof OperationListActivity) {
targetActivityName = OperationListActivity.class.getName();
} else {
targetActivityName = OperationRelatedContentActivity.class.getName();
}
ActivityHandlingHelper.getInstance().startChatWebViewActivity(new Long(0),"", ChatWebViewActivity.class.getName(), targetActivityName);
finishCommunicationMenuDialog();
}
});
} else {
......@@ -875,13 +897,23 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
mCommunicationMenuDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mCommunicationMenuDialog.dismiss();
finishCommunicationMenuDialog();
}
});
mCommunicationMenuDialog.show();
}
/**
* コミュニケーションダイアログ閉じる
*/
private void finishCommunicationMenuDialog() {
if (mCommunicationMenuDialog != null) {
mCommunicationMenuDialog.dismiss();
mCommunicationMenuDialog = null;
}
}
private void showOperationSelectDialog() {
OperationDao operationDao = AbstractDao.getDao(OperationDao.class);
mOperationSelectDialog = new Dialog(this);
......@@ -947,9 +979,12 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// プッシュメッセージで未読がなければ、下辺ツールバーのコミュニケーションボタンのバッジを外す
List<PushMessageDto> checkPushMessageList = mPushMessageListAdapter.getItems();
if (!checkUnReadCommunication(checkPushMessageList)) {
//OperationListActivityのwebview化のためnullチェック(OperationListActivityのナビゲーションはWebview内に含んでいる)
if (communicationButton != null) {
communicationButton.setImageResource(R.drawable.ic_communication_menu);
}
}
}
});
mPushMessageListView.invalidate();
mPushMessageListView.setClickable(false);
......@@ -1235,4 +1270,78 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
return existUnreadFlg;
}
/**
* プッシュメッセージがあるので、チャットルームに遷移する。
*/
public boolean goChatRoom(final Intent intent, final String targetActivityName, final String baseActivityName) {
if (!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
handler.postDelayed(new Runnable() {
@Override
public void run() {
if (!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.roomType)) &&
!StringUtil.isNullOrEmpty(intent.getStringExtra(AppDefType.ChatPushMessageKey.collaborationType))
) {
// roomTypeと、collaborationType が存在する場合は、協業を開始する。
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName),
intent.getStringExtra(AppDefType.ChatPushMessageKey.collaborationType),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomType),
targetActivityName,
baseActivityName);
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(
intent.getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
intent.getStringExtra(AppDefType.ChatPushMessageKey.roomName),
targetActivityName,
baseActivityName);
}
}
}, 500);
return true;
}
return false;
}
/**
* プッシュメッセージ受信後のダイアログを表示する。
* @param context コンテキスト
* @param messageMap プッシュメッセージ
*/
public void showChatRoomPopupMessage(Context context, Map<String, String> messageMap) {
String messageBody = messageMap.get(AppDefType.PushMessageKey.message);
if (StringUtil.isNullOrEmpty(messageBody)) {
return;
}
PushMessageJSON json = new PushMessageJSON(messageBody);
// 協業
String messageText = json.getMessage();
if (json.isCollaboration()) {
messageText = getString(R.string.msg_invite_collaboration);
}
Intent pushMsgDialog = new Intent(context, ShowPushMessageDailogActivity.class);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, messageText);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.data, json.getData());
pushMsgDialog.putExtra(AppDefType.PushMessageKey.operationId, json.getOperationID());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomId, json.getRoomId());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomName, json.getRoomName());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, json.getPushSendLoginId());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, json.getPushSendDate());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomType, json.getRoomType());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.collaborationType, json.getCollaborationType());
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, messageMap.get(AppDefType.ChatPushMessageKey.baseActivityName));
String newVersion = messageMap.get(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (newVersion != null && newVersion.equals(new String("true"))) {
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen, true);
} else {
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen, false);
}
startActivityForResult(pushMsgDialog, ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE);
}
}
......@@ -17,7 +17,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
......@@ -71,7 +70,6 @@ import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
......@@ -80,6 +78,9 @@ import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.NoPdfViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.PhotoEditActivity;
import jp.agentec.abook.abv.ui.viewer.foxitPdf.FoxitPdfCore;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
import jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil;
......@@ -89,9 +90,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のときのみ使用)
......@@ -127,6 +125,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected TextView operationNameTitle;
protected ImageButton operationHomeButton;
protected ImageButton taskListButton;
protected ImageButton quickReportPrintButton;
// protected ImageButton helpButton;
protected boolean isPageFinished;
......@@ -164,6 +163,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
isLinkedContent = intent.getBooleanExtra("isLinkedContent", false);
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1);
// 戻り先のActivity名を保存しておく
baseActivityName = getIntent().getStringExtra(AppDefType.ChatPushMessageKey.baseActivityName);
if (!isLinkedContent) {
operationDto = AbstractLogic.getLogic(OperationLogic.class).getOperation(mOperationId);
mXWalkOpenType = intent.getIntExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.DEFAULT);
......@@ -665,6 +667,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
fl.setBackgroundColor(getResources().getColor(R.color.operation_color));
operationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
quickReportPrintButton = (ImageButton) findViewById(R.id.btn_operation_print);
operationHomeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......@@ -679,6 +682,25 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
});
operationHomeButton.setVisibility(View.VISIBLE);
if(operationDto != null && operationDto.operationType == OperationType.PDF){
// 簡易帳票印刷ボタン
quickReportPrintButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showPrintTargetSelect(operationDto);
}
});
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport() && operationDto.quickReport == 1) {
quickReportPrintButton.setVisibility(View.VISIBLE);
} else {
if (findViewById(R.id.print_layout) != null) {
findViewById(R.id.print_layout).setVisibility(View.GONE);
quickReportPrintButton.setVisibility(View.GONE);
}
}
}
taskListButton = (ImageButton) findViewById(R.id.btn_show_task_list);
taskListButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -721,6 +743,19 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
/**
* 簡易帳票印刷対象選択画面表示
*/
private void showPrintTargetSelect(OperationDto operationDto) {
Intent intent = new Intent();
intent.setClass(ABVContentViewActivity.this, OnlineHTMLWebViewActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("LINKURL", AcmsApis.getApiUrl(ABVEnvironment.getInstance().acmsAddress, ABVDataCache.getInstance().getUrlPath(), AcmsApis.ApiQuickReportRevision) + "?isNative=1");
intent.putExtra("operationId", mOperationId);
startActivity(intent, NaviConsts.Right);
}
/**
* 360編集画面を閉じた時、呼び出す
*/
public void callUnloadAuth() {
......@@ -1125,6 +1160,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
} else if (mCmd.equals(ABookKeys.CMD_GET_GROUP_TREE_INFO)) {
List<JSONObject> groups = groupLogic.getAllGroupsJson();
afterABookCheckApi(mCmd, null, 0, "getAllGroups", groups.toString());
} else if (mCmd.equals(ABookKeys.CMD_CLOSE_TASK_LIST)) {
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
showConfirmSavePanoEdit();
} else {
// 作業終了する時、作業ID設定して作業一覧で使用するメソットを行う。
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId);
finishActivity(); // 開いてる画面を閉じる
}
}
}
......
......@@ -390,7 +390,9 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, extras.getLong(AppDefType.ChatPushMessageKey.roomId)); // Room Id
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, extras.getString(AppDefType.ChatPushMessageKey.roomName)); // Room Name
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, extras.getString(AppDefType.ChatPushMessageKey.pushSendLoginId)); // sendLoginId
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, extras.getString(AppDefType.ChatPushMessageKey.pushSendDate));
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, extras.getLong(AppDefType.ChatPushMessageKey.pushSendDate));
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, extras.getString(AppDefType.ChatPushMessageKey.roomType));
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, extras.getString(AppDefType.ChatPushMessageKey.collaborationType));
}
}
intent.setClassName(getApplicationContext().getPackageName(), getMainActivityClassName()).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
......
......@@ -216,6 +216,8 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
stopUpdateAnimation();
Logger.e(TAG, "Exception DataRefresh", e);
handleErrorMessageToast(ErrorCode.E107);
} finally {
//closeProgressPopup();
}
return result;
......
......@@ -3,15 +3,12 @@ package jp.agentec.abook.abv.ui.common.activity;
import android.content.DialogInterface;
import android.os.Bundle;
import java.util.Date;
import java.util.List;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.bl.websocket.MeetingManager;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.PushMessageKey;
......@@ -19,16 +16,17 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil;
public class ShowPushMessageDailogActivity extends ABVUIActivity {
private static final String TAG = "ShowPushMessageDailogActivity";
OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
boolean isMeetingRoomConnected = false;
boolean isCollabration = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -112,7 +110,9 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
alertDialog.show();
} else {
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this, getRString(R.string.app_name), getIntent().getExtras().getString(PushMessageKey.message));
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this,
getRString(R.string.app_name),
getIntent().getExtras().getString(PushMessageKey.message));
Bundle extras = getIntent().getExtras();
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
if (roomId == 0) {
......@@ -121,56 +121,84 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
alertDialog.setPositiveButton(R.string.move, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Check PushMessage
isMeetingRoomConnected = MeetingManager.getInstance().isConnected();
isCollabration = MeetingManager.getInstance().isCollaboration();
Bundle extras = getIntent().getExtras();
if (extras != null) {
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
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);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
List<PushMessageDto> pushMessageDtoList = AbstractLogic.getLogic(PushMessageLogic.class).getAllPushMessageList();
Logger.d("pushSendDate", "pushSendDate : " + pushSendDate);
String pushSendDateDate = DateTimeUtil.toString(new Date(pushSendDate), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate", "pushSendDateDate : " + pushSendDateDate);
String pushSendDateDate2 = DateTimeUtil.toString(DateTimeUtil.toDate(pushSendDateDate, DateTimeFormat.yyyyMMddHHmmssSSS_none), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate", "pushSendDateDate2 : " + pushSendDateDate2);
for (int i = 0; i < pushMessageDtoList.size() - 1; i++) {
String tempDate = DateTimeUtil.toString(pushMessageDtoList.get(i).pushSendDate, DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("tempDate", "date : " + tempDate);
}
if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName);
if (extras != null && !isMeetingRoomConnected) {
boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (isNewVersion) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType, roomType);
moveChatRoom(extras);
}
finish();
}
if (isMeetingRoomConnected || isCollabration) {
showCannotMoveChatRoomDialog();
}
finish();
}
});
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.CANCEL, getIntent());
finish();
}
});
}
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
alertDialog.show();
}
}
}
/**
* チャットルームへ遷移するための処理
* @param extras
*/
private void moveChatRoom(Bundle extras) {
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
String roomName = extras.getString(AppDefType.ChatPushMessageKey.roomName);
String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName, ChatWebViewActivity.class.getName(),"");
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId,
roomName,
collaborationType,
roomType,
ChatWebViewActivity.class.getName(),
"");
}
}
}
/**
* 遠隔支援中(会議室接続中)はチャットルームにはいけない。
*/
private void showCannotMoveChatRoomDialog() {
handler.post(new Runnable() {
@Override
public void onDismiss(DialogInterface dialog) {
public void run() {
String dialogMessage = null;
if (isCollabration) {
dialogMessage = getRString(R.string.chat_open_fail_collaborattion_connected);
} else if (isMeetingRoomConnected) {
dialogMessage = getRString(R.string.chat_open_fail_meeting_connected);
}
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this,
getRString(R.string.app_name),
dialogMessage);
alertDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.CANCEL, getIntent());
finish();
}
});
alertDialog.show();
}
}
});
}
}
......@@ -145,5 +145,9 @@ public interface AppDefType {
String pushSendDate = "pushSendDate";
String collaborationType = "collaborationType";
String roomType = "roomType";
String shopName = "shopName";
String loginId = "loginId";
String baseActivityName = "baseActivityName";
String needsDisplayOperationOrOperationRelatedContentScreen = "needsDisplayOperationOrOperationRelatedContentScreen";
}
}
......@@ -4,6 +4,7 @@ import android.app.Activity;
import android.app.AlertDialog;
import android.app.DownloadManager;
import android.app.PictureInPictureParams;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.ContentValues;
import android.content.Context;
......@@ -15,6 +16,7 @@ import android.content.res.Configuration;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.PixelFormat;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
......@@ -85,6 +87,7 @@ import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.VideoEncoder;
import jp.agentec.abook.abv.ui.home.view.ChatWebView;
import jp.agentec.abook.abv.ui.home.view.ChatWebViewDelegate;
import jp.agentec.abook.abv.ui.home.view.FullscreenableChromeClient;
import jp.agentec.abook.abv.ui.viewer.activity.CommunicationWebViewActivity;
import jp.agentec.adf.util.StringUtil;
......@@ -96,8 +99,9 @@ import static org.chromium.net.NetError.ERR_FAILED;
* Created by AIS-NB-048 on 2019/07/31.
*/
public class ChatWebViewActivity extends CommunicationWebViewActivity {
public class ChatWebViewActivity extends CommunicationWebViewActivity implements ChatWebViewDelegate {
private ChatWebView mChatWebView;
private ProgressDialog chatProgressDialog;
private String chatWebviewUrl;
private final String TAG = "ChatWebViewActivity";
......@@ -120,6 +124,10 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
private boolean needHostAlert = false;
public Long getRoomID() {
return chatData.roomId;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -158,11 +166,15 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
chatData.setIsOnline(false);
chatData.setContext(ChatWebViewActivity.this);
chatData.setIsMobile(!isNormalSize());
// どのアクティビティから遷移してきたか保存
baseActivityName = intent.getStringExtra(AppDefType.ChatPushMessageKey.baseActivityName);
}
private void setupChatWebView() {
mChatWebView = new ChatWebView(ChatWebViewActivity.this);
mChatWebView.configue(chatData);
mChatWebView.delegate = this;
}
private void setupDefaultChatWebViewURL() {
......@@ -179,7 +191,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
}
boolean isSIDValid = false;
try {
isSIDValid = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).checkSid(chatData.sid);
isSIDValid = AcmsClient.getInstance(chatData.shopName, ABVEnvironment.getInstance().networkAdapter).checkSid(chatData.sid);
} catch (Exception e) {
Logger.d("SID_CHECK_ERROR");
}
......@@ -188,7 +200,6 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
chatData.setIsOnline(true);
chatWebviewUrl = ABookCommConstants.CHAT_PAGE_URL;
showProgressPopup();
CommonExecutor.execute(new Runnable() {
@Override
public void run() {
......@@ -207,7 +218,6 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
}
}
});
closeProgressPopup();
} catch (Exception e) {
e.printStackTrace();
Logger.d("Update error");
......@@ -297,10 +307,10 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
boolean result = false;
// 画像が選択された場合
if (fileChooserParams.getAcceptTypes()[0].toLowerCase().contains(ABookKeys.IMAGE)) {
result = startCameraIntent(ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true);
result = startCameraIntent(ABookCommConstants.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(ABookCommConstants.ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
}
if (result) {
if (mUploadMessage != null) {
......@@ -561,7 +571,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
.getSystemService(Context.CONNECTIVITY_SERVICE);
if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(intent.getAction())) {
mChatWebView.dismissLoadingIndicator();
mChatWebView.hideLoadingIndicator();
}
if (intent.getAction().equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
......@@ -572,9 +582,14 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
} else {
chatData.setIsOnline(true);
mChatWebView.refreshForOnline();
if (mChatWebView.getUrl() != null
&& mChatWebView.getUrl().equals(ABookCommConstants.CHAT_ROOM_PAGE_URL))
{
if (
mChatWebView.getUrl() != null &&
(mChatWebView.getUrl().equals(ABookCommConstants.CHAT_ROOM_PAGE_URL) ||
mChatWebView.getUrl().equals(ABookCommConstants.CHAT_PAGE_URL) ||
mChatWebView.getUrl().equals(ABookCommConstants.CONTACT_URL) ||
mChatWebView.getUrl().equals(ABookCommConstants.ARCHIVE_URL) ||
mChatWebView.getUrl().indexOf(ABookCommConstants.ARCHIVE_DETAIL_URL) != -1)
) {
mChatWebView.windowReload();
}
}
......@@ -689,9 +704,9 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
}
}
if (requestCode == ABOOK_CHECK_TASK_IMAGE) {
if (requestCode == ABookCommConstants.ABOOK_CHECK_TASK_IMAGE) {
activityResultReceivedImage(dataUri);
} else if (requestCode == ABOOK_CHECK_TASK_VIDEO) {
} else if (requestCode == ABookCommConstants.ABOOK_CHECK_TASK_VIDEO) {
activityResultReceivedMovie(dataUri);
}
......@@ -764,14 +779,23 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
/**
* 作業一覧へ遷移
*
*/
public void backToHome() {
mChatWebView.leaveRoom();
exitAndDeleteMeetingRoom();
finish();
// 戻るの作業一覧か、関連資料のどちらかのActivityのみ
// デフォルトでは、作業一覧に戻る
Intent intent = new Intent();
if (OperationRelatedContentActivity.class.getName().equals(baseActivityName)) {
intent.setClass(ChatWebViewActivity.this, OperationRelatedContentActivity.class);
} else {
intent.setClass(ChatWebViewActivity.this, OperationListActivity.class);
}
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, ChatWebViewActivity.class.getName());
startActivity(intent, NaviConsts.Left);
}
......@@ -875,7 +899,6 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
}
}
// 共通資料画面表示
public void showCommonContent() {
Intent intent = new Intent();
......@@ -884,6 +907,52 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
startActivity(intent, NaviConsts.Left);
}
private void showChatWebViewProgressPopup() {
if (chatProgressDialog == null) {
chatProgressDialog = new ProgressDialog(this);
chatProgressDialog.setMessage(getResources().getString(R.string.progress));
chatProgressDialog.setIndeterminate(true);
chatProgressDialog.setCancelable(false);
if (chatProgressDialog.getWindow() != null) {
chatProgressDialog.getWindow().setFormat(PixelFormat.TRANSPARENT);
}
}
if (chatProgressDialog != null && !chatProgressDialog.isShowing() && !isFinishing()) {
chatProgressDialog.show();
}
}
private void closeChatWebViewProgressPopup() {
if (chatProgressDialog != null && chatProgressDialog.isShowing()) {
try {
chatProgressDialog.dismiss();
} catch (Exception e) {
Logger.e(TAG, "closeProgressPopup error. ", e); // ignore
}
}
}
@Override
public void chatWebViewNeedsShowProgressBar() {
runOnUiThread(new Runnable() {
@Override
public void run() {
showChatWebViewProgressPopup();
}
});
}
@Override
public void chatWebViewNeedsDismissProgressBar() {
runOnUiThread(new Runnable() {
@Override
public void run() {
closeChatWebViewProgressPopup();
}
});
}
public class NetworkTask extends AsyncTask<Void, Void, Bitmap> {
private String url;
......@@ -1119,17 +1188,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
}
public boolean addFavoriteUser(String shopMemberId) throws AcmsException {
Integer favoriteCount = communicationLogic.getFavoriteCount();
if (favoriteCount >= ABookCommConstants.SIZE.MAX_FAVORITE_COUNT ) {
mChatWebView.showAlert(getString(R.string.msg_error_favorites_100_over));
if (!validateFavoriteLimit()) {
return false;
}
try {
boolean result = chatData.insertFavoriteUser(shopMemberId);
if (!result) { return false; }
mChatWebView.refreshContactScreen();
return true;
return chatData.insertFavoriteUser(shopMemberId);
} catch (NetworkDisconnectedException e) {
mChatWebView.showAlert(getString(R.string.msg_eroor_network_offline));
}
......@@ -1139,12 +1203,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
public boolean removeFavoriteUser(String shopMemberId) throws AcmsException {
try {
boolean result = chatData.deleteFavoriteUser(shopMemberId);
if (!result) {
return false;
}
mChatWebView.refreshContactScreen();
return true;
return chatData.deleteFavoriteUser(shopMemberId);
} catch (NetworkDisconnectedException e) {
mChatWebView.showAlert(getString(R.string.msg_eroor_network_offline));
}
......@@ -1152,19 +1211,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
}
public boolean addFavoriteGroup(String groupId) throws AcmsException {
Integer favoriteCount = communicationLogic.getFavoriteCount();
if (favoriteCount >= ABookCommConstants.SIZE.MAX_FAVORITE_COUNT) {
mChatWebView.showAlert(getString(R.string.msg_error_favorites_100_over));
if (!validateFavoriteLimit()) {
return false;
}
try {
boolean result = chatData.insertFavoriteGroup(groupId);
if (!result) {
return false;
}
mChatWebView.refreshContactScreen();
return true;
return chatData.insertFavoriteGroup(groupId);
} catch (NetworkDisconnectedException e) {
mChatWebView.showAlert(getString(R.string.msg_eroor_network_offline));
}
......@@ -1174,12 +1226,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
public boolean removeFavoriteGroup(String groupId) throws AcmsException {
try {
boolean result = deleteFavoriteGroup(groupId);
if (!result) {
return false;
}
mChatWebView.refreshContactScreen();
return true;
return deleteFavoriteGroup(groupId);
} catch (NetworkDisconnectedException e) {
mChatWebView.showAlert(getString(R.string.msg_eroor_network_offline));
}
......@@ -1190,6 +1237,15 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
chatData.updateFavoriteInfo();
}
private boolean validateFavoriteLimit() {
Integer favoriteCount = communicationLogic.getFavoriteCount();
if (favoriteCount >= ABookCommConstants.SIZE.MAX_FAVORITE_COUNT) {
mChatWebView.showAlert(getString(R.string.msg_error_favorites_100_over));
return false;
}
return true;
}
public int createContentView() {
finishBeforeContentListActivity();
PictureInPictureParams.Builder mPipBuilder = new PictureInPictureParams.Builder();
......@@ -1237,7 +1293,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
meetingManager.close();
try {
connectMeetingServer();
List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey);
List<MeetingDto> meetingList = meetingManager.getMeetingList(mSkey);
meetingManager.join(chatData.joinMeetingId, mSkey, chatData.roomId.toString(), false);
meetingManager.setCollaboration(true);
} catch (Exception e) {
......@@ -1292,4 +1348,5 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
// 最後のチャットのルーム
PreferenceUtil.putUserPref(getApplicationContext(), AppDefType.UserPrefKey.CHAT_LAST_ROOMID, roomId);
}
}
......@@ -5,27 +5,21 @@ import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.webkit.JavascriptInterface;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RadioGroup;
import android.widget.TextView;
......@@ -37,10 +31,7 @@ import net.lingala.zip4j.exception.ZipException;
import org.json.adf.JSONObject;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -63,6 +54,7 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.Constant.ReportType;
import jp.agentec.abook.abv.bl.common.Constant.TaskReportLevel;
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.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
......@@ -86,13 +78,12 @@ import jp.agentec.abook.abv.bl.dto.TaskReportDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationGroupMasterLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.OperationLocationType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.ViewMode;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.OperationLocationType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
......@@ -104,7 +95,6 @@ import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView;
import jp.agentec.abook.abv.ui.common.view.ABVListDialog;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.adapter.HierarchyOperationGroupListAdapter;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper;
......@@ -112,6 +102,7 @@ import jp.agentec.abook.abv.ui.home.helper.OperationGroupMasterListHelper;
import jp.agentec.abook.abv.ui.home.helper.OperationListHelper;
import jp.agentec.abook.abv.ui.viewer.activity.DeviceImageListActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
......@@ -121,38 +112,35 @@ import jp.agentec.adf.util.StringUtil;
/**
* Created by leej on 2018/08/17
*/
public class OperationListActivity extends ABVUIActivity {
private static final String TAG = "OperationListActivity";
private ImageButton mViewModeButton; // パンネル・リスト表示ボタン
private ImageButton mSearchButton; // 検索ボタン
private ImageButton mCommonContentButton; // 共通資料ボタン
private ImageButton mOperationBatchSyncButton; // カテゴリの一括同期ボタン
private ImageButton mCategoryLocationButton; // カテゴリ選択ボタン
private ImageButton mQuickReportPrintButton; // 簡易帳票印刷ボタン
private TextView mOperationTitle; // 一覧のタイトル
private WebView mCheckWebView;
private final String OPERATION_LIST_PAGE = "file:///android_asset/check/app/index.html?";
private JsInf jsInf = new JsInf();
// 検索画面の条件(文字列)
public String mSearchWord; // 検索画面の値(作業名)
public String mStartDateStr; // 検索画面の値(作業開始日)
public String mEndDateStr; // 検索画面の値(作業終了日)
public int sortType = 2;
public boolean isSearch = false;
public int mOperationGroupMasterId = 0;
boolean firstFlg = true;
private EditText mSearchTextView; // 検索画面の作業名
private TextView mStartDate; // 検索画面の作業開始日
private TextView mEndDate; // 検索画面の作業終了日
private Dialog mSearchDialog;
private Date mOperationLastEditDate;
private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class);
private OperationContentDao mOperationContentDao = AbstractDao.getDao(OperationContentDao.class);
private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class);
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private OperationGroupMasterLogic mOperationGroupMasterLogic = AbstractLogic.getLogic(OperationGroupMasterLogic.class);
private PushMessageLogic mPushMessageLogic = AbstractLogic.getLogic(PushMessageLogic.class);
private TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
private boolean activityResultFlg;
......@@ -172,169 +160,118 @@ public class OperationListActivity extends ABVUIActivity {
private static final int SUB_DIVICE_IMAGE_LIST_ACTIVITY = 1001;
private Long mSelectedOperationId;
// ビューの作成
private class ReloadHandler implements Runnable {
@Override
public void run() {
View child = mListHelper.getOperationView();
ViewGroup parent = (ViewGroup) child.getParent();
if (parent != null) {
parent.removeView(child);
}
FrameLayout vg = (FrameLayout) findViewById(R.id.operation_list_layout);
vg.removeAllViews();
vg.addView(child);
// ツールバーのビューモードイメージ変更
if (getABVUIDataCache().getViewMode() == AppDefType.ViewMode.PANEL) {
mViewModeButton.setImageResource(R.drawable.ic_display_list);
} else {
mViewModeButton.setImageResource(R.drawable.ic_display_pannel);
}
closeProgressPopup();
}
}
private Integer mScanType;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac_operation_list);
//setContentView(R.layout.ac_operation_list);
setContentView(R.layout.chat_webview);
mCheckWebView = findViewById(R.id.chatWebview);
mCheckWebView.setOverScrollMode(View.OVER_SCROLL_NEVER); //オーバースクロールしない。
mCheckWebView.setVerticalScrollBarEnabled(false); //スクロールバーを消す。
mCheckWebView.addJavascriptInterface(jsInf, "android");
if (Logger.isDebugEnabled()) {
mCheckWebView.setWebContentsDebuggingEnabled(true);
}
WebSettings settings = mCheckWebView.getSettings();
settings.setJavaScriptEnabled(true); //Javascriptを有効にする。
settings.setAppCacheEnabled(true);
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
settings.setDomStorageEnabled(true);
settings.setDatabaseEnabled(true);
settings.setMediaPlaybackRequiresUserGesture(false);
settings.setAllowFileAccess(true);
settings.setUseWideViewPort(true);
settings.setAllowContentAccess(true);
settings.setAllowFileAccessFromFileURLs(true);
settings.setSaveFormData(false);
settings.setAllowUniversalAccessFromFileURLs(true);
ArrayList<String> paramList = new ArrayList<String>();
paramList.add("debug=1");
paramList.add("app=android");
paramList.add("mobile_flg=" + (isNormalSize() ? "1" : "0"));
paramList.add("isRFIDBarcodeScan=" + (ABVDataCache.getInstance().serviceOption.isUsableRFIDBarcodeScan() ? "1" : "0"));
paramList.add("isOperationGroupMaster=" + (ABVDataCache.getInstance().serviceOption.isOperationGroupMaster() ? "1" : "0"));
mCheckWebView.postUrl(OPERATION_LIST_PAGE + StringUtil.join("&", paramList), null);
mListHelper = getListHelper();
// ビュー変更ボタン
mViewModeButton = (ImageButton) findViewById(R.id.btn_view_mode);
// 検索ボタン
mSearchButton = (ImageButton) findViewById(R.id.btn_search);
// ツールバーのタイトル表示
mOperationTitle = (TextView) findViewById(R.id.operation_title);
mOperationBatchSyncButton = (ImageButton) findViewById(R.id.btn_batch_sync);
communicationButton = (ImageButton) findViewById(R.id.btn_communication_menu);
mCommonContentButton = (ImageButton) findViewById(R.id.btn_common_content);
mCategoryLocationButton = (ImageButton) findViewById(R.id.btn_category_location);
mQuickReportPrintButton = (ImageButton) findViewById(R.id.btn_operation_print);
// 定期点検で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、needSyncFlgをtrueに更新
updateNeedSyncRoutineOperation();
// 非活性化する(ホーム画面ではホームボタンが必要ないため)
ImageButton operationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
operationHomeButton.setEnabled(false);
// ビュー変更ボタンのタッチイベント
mViewModeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (getABVUIDataCache().getViewMode() == ViewMode.PANEL) {
getABVUIDataCache().setViewMode(ViewMode.LIST);
} else {
getABVUIDataCache().setViewMode(ViewMode.PANEL);
}
setOperationListView();
}
});
// サービスオプション(作業種別使用)をセット
mOperationGroupMasterServiceOperationFlg = ABVDataCache.getInstance().serviceOption.isOperationGroupMaster();
// 検索アイコンのクリックイベント
mSearchButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showSearchDialog();
}
});
// コミュニケーションボタン
communicationButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showCommunicationMenuDialog();
}
});
// 共通関連資料ボタン
mCommonContentButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showCommonContent();
}
});
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
// 簡易帳票印刷ボタン
mQuickReportPrintButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showPrintTargetSelect();
}
});
mQuickReportPrintButton.setVisibility(View.VISIBLE);
} else {
findViewById(R.id.print_layout).setVisibility(View.GONE);
mQuickReportPrintButton.setVisibility(View.GONE);
}
// 一括同期ボタン
mOperationBatchSyncButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// ネットワーク通信チェック
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
showSimpleAlertDialog(getString(R.string.app_name), getString(R.string.request_network_connection));
return;
}
// 新着更新チェック
if (contentRefresher.isRefreshing()) {
showSimpleAlertDialog(getString(R.string.app_name), getString(R.string.msg_batch_sync_new_content_updating));
return;
}
// 会議室接続中
if (ActivityHandlingHelper.getInstance().isMeetingConnected()) {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.msg_operation_enable_meeting_room_connected, Toast.LENGTH_SHORT);
return;
}
showBatchSyncDialog();
}
});
if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.PushMessageKey.operationId))) {
final long operationId = Long.parseLong(getIntent().getStringExtra(AppDefType.PushMessageKey.operationId));
String message = getIntent().getStringExtra(AppDefType.PushMessageKey.message);
if (operationId > 0) {
if (operationId < 1) { return; }
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, getRString(R.string.app_name), message);
// リソースパターンの適用
alertDialog.setPositiveButton(PatternStringUtil.patternToInt(getApplicationContext(), R.string.work_report, getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
alertDialog.setPositiveButton(PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.work_report,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
if (contentRefresher.isRefreshing()) {
// リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.msg_routineTask_report_disable_refreshing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
)
);
} else if(ActivityHandlingHelper.getInstance().isMeetingConnected()) {
// リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.msg_routineTask_report_disable_meeting_room,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
)
);
} else if (isShowingBatchSync()) {
// 一括同期中は移動しない
ErrorMessage.showErrorMessageToast(OperationListActivity.this, getString(R.string.msg_batch_sync_move_operation_view));
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
getString(R.string.msg_batch_sync_move_operation_view)
);
} else {
OperationDto operationDto = mOperationLogic.getOperation(operationId);
if (operationDto == null) {
// リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.msg_routineTask_report_disable_no_operation,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
)
);
} else if (operationDto.needSyncFlg) {
// リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.msg_routineTask_report_disable_not_updated,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
)
);
} else {
startTaskDirectionOrReportView(operationDto);
}
......@@ -342,7 +279,8 @@ public class OperationListActivity extends ABVUIActivity {
dialog.dismiss();
}
});
}
);
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
......@@ -352,24 +290,189 @@ public class OperationListActivity extends ABVUIActivity {
});
alertDialog.show();
}
}
private class JsInf {
@JavascriptInterface
public void sendParam(String param) {
JSONObject jsonParam = new JSONObject(param);
OperationDto operationDto;
if (jsonParam.has(ABookKeys.CMD)) {
switch (jsonParam.getString(ABookKeys.CMD)){
case ABookKeys.CMD_KEY.GO_SETTING:
showSetting();
break;
case ABookKeys.CMD_KEY.GO_RELATION_CONTENT:
showCommonContent();
break;
case ABookKeys.CMD_KEY.GO_PRINT_TARGET:
showPrintTargetSelect();
break;
case ABookKeys.CMD_KEY.GO_OPERATION:
if (!jsonParam.has(ABookKeys.OPERATION_ID)) {
break;
}
if (jsonParam.has(ABookKeys.SCAN_TYPE)) {
mScanType = jsonParam.getInt(ABookKeys.SCAN_TYPE);
}
final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
if (tempOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
public void run() {
openReportView(tempOperationDto);
}
};
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(tempOperationDto);
}
// プッシュメッセージがある場合
else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName));
});
} else {
openReportView(tempOperationDto);
}
break;
// リスト更新
setOperationListView();
case ABookKeys.CMD_KEY.GO_COMMUNICATION:
showCommunicationMenuDialog();
break;
case ABookKeys.CMD_KEY.GO_PANORAMA_EDIT:
final OperationDto panoramaOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
if (panoramaOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
public void run() {
startPanoEdit(panoramaOperationDto);
}
};
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(panoramaOperationDto);
}
});
} else {
startPanoEdit(panoramaOperationDto);
}
break;
case ABookKeys.CMD_KEY.REFRESH_CONTENT:
handler.post(new Runnable() {
@Override
public void run() {
showProgressPopup();
}
});
dataRefresh(true);
break;
case ABookKeys.CMD_KEY.CHANGE_OPERATION_GROUP_MASTER:
clearSearch();
List<OperationDto>operationList = mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(jsonParam.getInt(ABookKeys.OPERATION_GROUPMASTER_ID), null);
mOperationLogic.createOperationListJson(operationList, null);
break;
case ABookKeys.CMD_KEY.RESET_SEARCH:
clearSearch();
runOnUiThread(new Runnable() {
@Override
public void run() {
mCheckWebView.loadUrl("javascript:CHK.initReportApp();");
}
});
break;
}
}
}
@JavascriptInterface
public String getCachePath() {
return getCacheDir().getAbsolutePath();
}
@JavascriptInterface
public String searchOperationList(String searchKeyword, String searchStartDate, String searchEndDate, int operationGroupMasterId) {
mSearchWord = searchKeyword;
mStartDateStr = searchStartDate;
mEndDateStr = searchEndDate;
List<OperationDto> operationList;
if (operationGroupMasterId != 0) {
mOperationGroupMasterId = operationGroupMasterId;
}
operationList = mListHelper.filterOperationList();
String searchOperationListStr = mOperationLogic.createOperationListJson(operationList, null);
isSearch = true;
return searchOperationListStr;
}
@JavascriptInterface
public void startScan() {
//TODO ConnectScanner
}
@JavascriptInterface
public void stopScan() {
//TODO DisconnectScanner
}
@JavascriptInterface
public void setSortType(int requestSortType) {
sortType = requestSortType;
}
@JavascriptInterface
public int getSortType() {
return sortType;
}
@JavascriptInterface
public void testScanResult(String code, int scanType) {
onScanned(code, scanType);
}
@JavascriptInterface
public void showLoading() {
handler.post(new Runnable() {
@Override
public void run() {
showProgressPopup();
}
});
}
@JavascriptInterface
public void hideLoading() {
handler.post(new Runnable() {
@Override
public void run() {
closeProgressPopup();
}
});
}
}
//TODO Method called when code is scanned
public void onScanned(final String code, final int scanType) {
runOnUiThread(new Runnable() {
@Override
public void run() {
mCheckWebView.loadUrl("javascript:CHK.scanResult(" + code + "," + scanType + " );");
}
});
}
// 共通資料画面表示
private void showCommonContent() {
Intent intent = new Intent();
intent.setClass(OperationListActivity.this, OperationRelatedContentActivity.class);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationListActivity.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent, NaviConsts.Right);
}
......@@ -387,58 +490,15 @@ public class OperationListActivity extends ABVUIActivity {
startActivity(intent, NaviConsts.Right);
}
// ツールバーの設定
private void configurationToolbarIcon() {
// バッチを付けるか判定して、イメージを設定
setCommunicationImageButton();
// 作業種別表示・非表示
if (mOperationGroupMasterServiceOperationFlg) {
mCategoryLocationButton.setVisibility(View.VISIBLE);
// アイコンの変更
if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.CATEGORY) {
setCategoryImage(true);
mOperationTitle.setText(R.string.title_category);
// 検索ワード削除
clearSearch();
// 検索ボタンを無効にする
mSearchButton.setEnabled(false);
// 一括同期ボタン表示
mOperationBatchSyncButton.setVisibility(View.VISIBLE);
} else {
// 全て
// 検索ボタンを活性化
mSearchButton.setEnabled(true);
setCategoryImage(false);
// 一括同期ボタン非表示
mOperationBatchSyncButton.setVisibility(View.GONE);
mOperationTitle.setText(R.string.title_all_operation);
}
} else {
mOperationTitle.setText(R.string.title_all_operation);
// アイコン非表示
setCategoryImage(false);
mCategoryLocationButton.setVisibility(View.GONE);
// 一括同期ボタンを非表示
mOperationBatchSyncButton.setVisibility(View.GONE);
// 検索ボタンを活性化
mSearchButton.setEnabled(true);
}
// 検索済みの場合、タイトルを「検索結果」にする
if (isSearched()) {
mOperationTitle.setText(R.string.search_result);
}
}
// 検索ワードのクリア
private void clearSearch() {
mSearchWord = null;
mStartDateStr = null;
mEndDateStr = null;
clearData();
mOperationGroupMasterId = 0;
isSearch = false;
sortType = 2;
//clearData();
}
// 検索済みかどうかチェック
......@@ -446,25 +506,15 @@ public class OperationListActivity extends ABVUIActivity {
return !(StringUtil.isNullOrEmpty(mSearchWord) && StringUtil.isNullOrEmpty(mStartDateStr) && StringUtil.isNullOrEmpty(mEndDateStr));
}
// カテゴリのアイコンイメージ設定
private void setCategoryImage(boolean isCategory) {
mCategoryLocationButton.setImageResource(isCategory ? R.drawable.ic_category_on : R.drawable.ic_category_off);
}
/**
* ビューを作り直す。
*/
public void setOperationListView() {
mListHelper = getListHelper();
handler.post(new ReloadHandler());
configurationToolbarIcon();
screenRefresh();
}
// ビューを作り直さずにリストだけ更新する
public void refreshOperationList() {
mListHelper.refreshList();
configurationToolbarIcon();
}
@Override
public void onRefreshedContent(final boolean result, long contentId, Exception e) {
......@@ -482,19 +532,13 @@ public class OperationListActivity extends ABVUIActivity {
// 絞り検索マスタデータ最新更新する時fetchDateをローカルに保存する。
setApertureMasterDataFetchDate();
if (mOperationGroupMasterServiceOperationFlg == ABVDataCache.getInstance().serviceOption.isOperationGroupMaster()) {
// サービスオプションが変わってない場合は、ビューは作らずにデータのみ更新
refreshOperationList();
} else {
if (mOperationGroupMasterServiceOperationFlg != ABVDataCache.getInstance().serviceOption.isOperationGroupMaster()) {
// 初期化
getABVUIDataCache().clearOperationGroupMaster();
mOperationGroupMasterServiceOperationFlg = ABVDataCache.getInstance().serviceOption.isOperationGroupMaster();
// 作業種別の選択画面を閉じる
closeOperationGroupMasterDialog();
// ビューを作り直す
setOperationListView();
}
screenRefresh();
}
}
});
......@@ -512,6 +556,12 @@ public class OperationListActivity extends ABVUIActivity {
public void onResume() {
Logger.i(TAG, "onResume:start");
super.onResume();
if (isSearch) {
isSearch = false;
return;
}
//アプリロック状態の場合、何もしない。
if (checkForceLoginPeriodically()) {
return;
......@@ -520,42 +570,46 @@ public class OperationListActivity extends ABVUIActivity {
// 一括同期中の場合何もしない
return;
}
refreshOperationList();
screenRefresh();
// プッシュメッセージがある場合の処理
if (goChatRoom(getIntent(), ChatWebViewActivity.class.getName(), OperationListActivity.class.getName())) {
return;
}
// 報告画面から作業一覧へ戻った時の同期処理
final long operationId = getUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, -1L);
if (operationId != -1) {
final OperationDto operationDto = mOperationLogic.getOperation(operationId);
// リソースパターンの適用
showProgressView(PatternStringUtil.patternToString(getApplicationContext(),
R.string.synchronizing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
CommonExecutor.execute(new Runnable() {
if (operationId == -1) {
handler.post(new Runnable() {
@Override
public void run() {
Logger.d(TAG, "onResume Sync operationId : " + operationId);
if (operationDto != null && operationDto.needSyncFlg) {
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
closeProgressPopup();
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.msg_network_offline, Toast.LENGTH_SHORT);
return;
}
// 同期処理後、直列処理で新着更新を行う。
singleSyncOperation(operationId, operationDto.reportType);
} else {
closeProgressPopup();
showProgressPopup();
}
});
if (firstFlg) {
dataRefresh(true);
firstFlg = false;
}
runOnUiThread(new Runnable() {
@Override
public void run() {
try {
createJsonForOperationList(getCacheDir().getAbsolutePath());
//closeProgressPopup();
} catch (Exception e) {
Logger.d("Update error");
}
}
});
}
if (!activityResultFlg && operationId == -1) {
dataRefresh(true);
//dataRefresh(true);
}
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, -1L);
activityResultFlg = false;
configurationToolbarIcon();
}
// 検索ダイアログ表示
......@@ -617,7 +671,7 @@ public class OperationListActivity extends ABVUIActivity {
mStartDateStr = StringUtil.toString(mStartDate.getText());
mEndDateStr = StringUtil.toString(mEndDate.getText());
refreshOperationList();
screenRefresh();
mSearchDialog.dismiss();
// 検索条件に条件がある場合のみ、件数のトーストメッセージは表示する
......@@ -653,7 +707,6 @@ public class OperationListActivity extends ABVUIActivity {
int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH);
//TODO layout変更 => DatePickerDialog.Theme_Holo_Light
final DatePickerDialog dpd = new DatePickerDialog(this, android.R.style.Theme_Holo_Light_Dialog, new DatePickerDialog.OnDateSetListener() {
@Override
......@@ -679,20 +732,17 @@ public class OperationListActivity extends ABVUIActivity {
}
private void clearData() {
// 開始日の初期化
if (mStartDate != null) {
mStartDate.setText(StringUtil.Empty);
}
// 終了日の初期化
if (mEndDate != null) {
mEndDate.setText(StringUtil.Empty);
}
// 作業名の初期化
if (mSearchTextView != null) {
mSearchTextView.setText(StringUtil.Empty);
runOnUiThread(new Runnable() {
@Override
public void run() {
mCheckWebView.loadUrl("javascript:$('#searchTaskName').val('');");
mCheckWebView.loadUrl("javascript:$('#searchStartDate').val('');");
mCheckWebView.loadUrl("javascript:$('#searchEndDate').val('');");
mCheckWebView.loadUrl("javascript:$('.sort-type').removeClass('active');");
mCheckWebView.loadUrl("javascript:$('#defaultSort').addClass('active');");
}
});
}
// 開始日と終了日のバリデーション
......@@ -737,8 +787,14 @@ public class OperationListActivity extends ABVUIActivity {
}
} else if (operationDto.operationType == OperationType.PDF) {
contentPath = ABVEnvironment.getInstance().getTaskPdfDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
if (operationDto.reportType == ReportType.ReportContinuous) {
contentPath = ABVEnvironment.getInstance().getProcessListDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
}
} else {
contentPath = ABVEnvironment.getInstance().getPanoImageDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
if (operationDto.reportType == ReportType.ReportContinuous) {
contentPath = ABVEnvironment.getInstance().getProcessListDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
}
}
// 作業の報告画面を表示時、必要なJSONファイル作成
......@@ -755,7 +811,21 @@ public class OperationListActivity extends ABVUIActivity {
path.append("/index.html?app=android");
path.append("&report_type=" + operationDto.reportType); // 作業報告タイプ : 0:報告 1:定期点検 2:報告(回答)
path.append("&mobile_flg=" + (isNormalSize() ? "1" : "0")); // ScreenType
path.append("&operationId=" + operationDto.operationId);
path.append("&sid=" + ABVDataCache.getInstance().getMemberInfo().sid);
path.append("&quickReport=" + operationDto.quickReport);
path.append("&shopName=" + ABVDataCache.getInstance().getUrlPath());
path.append("&acmsAddress=" + ABVEnvironment.getInstance().acmsAddress);
if (mScanType != null) {
String scanTypeKey = null;
if (mScanType.equals(ABookKeys.SCAN_TYPE_VALUE.BARCODE)) {
scanTypeKey = ABookKeys.SCAN_TYPE_KEY.BARCODE;
} else if (mScanType.equals(ABookKeys.SCAN_TYPE_VALUE.RFID)) {
scanTypeKey = ABookKeys.SCAN_TYPE_KEY.RFID;
}
path.append("&scanType=" + scanTypeKey);
mScanType = null;
}
Logger.d(TAG, "path : " + path);
// #32926 作業報告画面改善 end
Intent intent = new Intent();
......@@ -763,6 +833,7 @@ public class OperationListActivity extends ABVUIActivity {
intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId);
intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.TASK_REPORT);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationListActivity.class.getName());
if(operationDto.operationType == OperationType.PDF) {
intent.putExtra("LINKURL", "file://" + path);
......@@ -946,7 +1017,7 @@ public class OperationListActivity extends ABVUIActivity {
progressDialogHorizontal.setProgress(100);
}
mOperationLastEditDate = null;
refreshOperationList();
//screenRefresh();
closeProgressPopup();
}
});
......@@ -972,7 +1043,7 @@ public class OperationListActivity extends ABVUIActivity {
return;
}
if (operationDto.contentId != null && operationDto.contentId != 0) {
showProgressPopup();
//showProgressPopup();
try {
String baseUrl = ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/shop/login/authByCheck/%s/%s";
String url = String.format(baseUrl, ABVDataCache.getInstance().getMemberInfo().sid, operationDto.contentId);
......@@ -980,6 +1051,7 @@ public class OperationListActivity extends ABVUIActivity {
intent.putExtra(ABookKeys.CONTENT_ID, operationDto.contentId);
intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId);
intent.putExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.PANO_EDIT);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationListActivity.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(OperationListActivity.this, HTMLXWalkWebViewActivity.class);
ActivityHandlingHelper.getInstance().startHTMLXWalkWebActivity(OperationListActivity.this, intent, url, operationDto.contentId, -1, -1, -1, -1, -1);
......@@ -987,7 +1059,7 @@ public class OperationListActivity extends ABVUIActivity {
Logger.e(TAG, e);
ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107);
} finally {
closeProgressPopup();
//closeProgressPopup();
}
}
}
......@@ -1250,13 +1322,23 @@ public class OperationListActivity extends ABVUIActivity {
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode,requestCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) {
goChatRoom(intent, ChatWebViewActivity.class.getName(), OperationListActivity.class.getName());
}
return;
}
activityResultFlg = true;
Uri result = (intent == null || resultCode != RESULT_OK) ? null : intent.getData();
//ベースファイル登録した後にシーン画像選択画面閉じた後に呼ばれる
if (requestCode == SUB_DIVICE_IMAGE_LIST_ACTIVITY && resultCode == RESULT_OK) {
mOperationLogic.setContentCreatingFlg(mSelectedOperationId);
refreshOperationList();
//screenRefresh();
//10秒(コンテンツ作成し、公開までの時間)に新着更新させる。
showProgressView(getString(R.string.msg_common_processing));
......@@ -1610,15 +1692,6 @@ public class OperationListActivity extends ABVUIActivity {
}
/**
* 作業種別選択画面を閉じる処理
*/
public void closeOperationGroupMasterDialog() {
if (mShowDialog != null && mShowDialog.isShowing()) {
mShowDialog.dismiss();
}
}
/**
* 絞り検索の日付を設定
*/
private void setApertureMasterDataFetchDate() {
......@@ -1727,19 +1800,6 @@ public class OperationListActivity extends ABVUIActivity {
return true;
}
/**
* 一括同期の活性化・非活性化チェック
*/
public void checkBatchNeedSyncButton(Integer operationGroupMasterId) {
if (mOperationDao.hasNeedSyncOperationByGroupMasterId(operationGroupMasterId)) {
// 選択したカテゴリ一覧でneedSyncFlgがtrueの作業が存在すれば、活性化する
mOperationBatchSyncButton.setEnabled(true);
} else {
// 一括同期ボタンを非活性化する
mOperationBatchSyncButton.setEnabled(false);
}
}
@Override
public void onDestroy() {
Logger.d(TAG, "onDestroy");
......@@ -1774,7 +1834,7 @@ public class OperationListActivity extends ABVUIActivity {
Logger.d(TAG, "onClickSortMenuByTablet id:" + id);
getABVUIDataCache().setSortCondition((int)id);
// ビューア更新
refreshOperationList();
screenRefresh();
}
});
......@@ -1815,7 +1875,7 @@ public class OperationListActivity extends ABVUIActivity {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
getABVUIDataCache().setSortCondition((int)id);
refreshOperationList();
screenRefresh();
}
});
......@@ -1916,14 +1976,9 @@ public class OperationListActivity extends ABVUIActivity {
// typeの値をxmlに書き込み
getABVUIDataCache().setOperationGroupMasterMode((int) type);
// プログレスバー
showProgressPopup();
//showProgressPopup();
setOperationListView();
}
if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.CATEGORY) {
//作業種別モードの場合は、作業種別選択ダイアログ画面を表示
showOperationGroupMasterDialog(true);
}
}
/**
......@@ -1934,4 +1989,26 @@ public class OperationListActivity extends ABVUIActivity {
return getABVUIDataCache().getSortCondition();
}
public void createJsonForOperationList(String filePath) {
//clearSearch();
List<OperationDto> operationList = mListHelper.filterOperationList();
mOperationLogic.createOperationListJson(operationList, filePath);
mOperationGroupMasterLogic.createOperationGroupMasterListJson(filePath);
mOperationGroupMasterLogic.createOperationGroupMasterRelationListJson(filePath);
mPushMessageLogic.createOperationPushMessageListJson(filePath);
}
public void screenRefresh() {
runOnUiThread(new Runnable() {
@Override
public void run() {
try {
createJsonForOperationList(getCacheDir().getAbsolutePath());
mCheckWebView.loadUrl("javascript:CHK.initReportApp();");
} catch (Exception e) {
Logger.d("Update error");
}
}
});
}
}
......@@ -11,7 +11,6 @@ import android.view.Display;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
......@@ -21,11 +20,11 @@ import android.widget.Toast;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.exception.ExceptionHandler;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
......@@ -36,7 +35,6 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.websocket.MeetingManager;
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.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
......@@ -77,6 +75,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
Logger.i(TAG,"onCreate");
super.onCreate(savedInstanceState);
updateCollaborationInfo();
setContentView(R.layout.ac_operation_related_content);
......@@ -121,11 +120,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showCommunicationMenuDialog();
}
});
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
mQuickReportPrintButton.setVisibility(View.VISIBLE);
} else {
if (findViewById(R.id.print_layout) != null) {
findViewById(R.id.print_layout).setVisibility(View.GONE);
mQuickReportPrintButton.setVisibility(View.GONE);
}
}
......@@ -289,6 +285,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
}
Intent intent = new Intent();
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationRelatedContentActivity.class.getName());
ActivityHandlingHelper.getInstance().checkContentActivity(contentId, 0, intent);
}
} catch (Exception e) {
......@@ -408,9 +405,12 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
* 作業一覧へ戻る
*/
private void backToHome() {
finish();
// 終了後、アニメーション追加(左へ移動)
overridePendingTransition(R.anim.viewin_left_to_right, R.anim.viewout_left_to_right);
Intent intent = new Intent();
intent.setClass(OperationRelatedContentActivity.this, OperationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationRelatedContentActivity.class.getName());
// 左へ移動しながら戻る
startActivity(intent, NaviConsts.Left);
}
public void showCancelDownloadDialog(final ContentDto contentDto) {
......@@ -544,6 +544,9 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
updateCollaborationInfo();
refreshCollaborationUI();
super.onResume();
if(goChatRoom(getIntent(), ChatWebViewActivity.class.getName(), OperationRelatedContentActivity.class.getName())) {
return;
}
showOperationRelatedContentList();
}
......@@ -595,4 +598,16 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
super.showAlertDialog(alertDialog);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) {
finish();
goChatRoom(intent, ChatWebViewActivity.class.getName(), getClass().getName());
}
return;
}
}
}
......@@ -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/");
......@@ -1640,12 +1639,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId);
intent.putExtra("shopName", shopName);
if(dto != null)
{
intent.putExtra("roomId",dto.roomId);
intent.putExtra("roomName", dto.roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
if (dto != null) {
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, dto.roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, dto.roomName);
}
intent.setClassName(mContext.getPackageName(), className);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
......@@ -1655,36 +1653,39 @@ 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;
intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId);
intent.putExtra("shopName", shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.setClassName(mContext.getPackageName(), className);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent);
}
// プシュメッセージからチャットに入る
public void startChatWebViewActivity(Long roomId, String roomName) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
/**
* プシュメッセージからチャットに遷移する
* @param roomId chatRoom の Id
* @param roomName chatRoom の名前
* @param targetActivityName 直接chatRoom に遷移する場合は、ChatWebViewActivity名。chatRoomに遷移する前に、別のActivityを経由する場合は、そのActivity名
* @param baseActivityName この関数を呼び出したActivity名。戻る時にはこのアクティビティに戻る
*/
public void startChatWebViewActivity(Long roomId, String roomName, String targetActivityName, String baseActivityName) {
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("shopName", shopName);
intent.putExtra("roomId", roomId);
intent.putExtra("roomName", roomName);
intent.setClassName(mContext.getPackageName(), className);
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
intent.setClassName(mContext.getPackageName(), targetActivityName);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent);
}
......@@ -1914,22 +1915,28 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
this.previousOfSettingActivity2 = activity;
}
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
/**
* プッシュメッセージから協業に遷移する
* @param roomId
* @param roomName
* @param collaborationType
* @param roomType
*/
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType, String targetActivityName, String baseActivityName) {
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;
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.putExtra("roomType", roomType);
intent.setClassName(mContext.getPackageName(), className);
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, collaborationType);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
intent.setClassName(mContext.getPackageName(), targetActivityName);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent);
}
......
......@@ -22,6 +22,6 @@ public class HomeOperationListHelper extends OperationListHelper {
protected List<OperationDto> findOperationList() throws Exception {
int operationSortType = mAppActivity.getSortCondition();
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType, mAppActivity.mOperationGroupMasterId);
}
}
......@@ -68,11 +68,9 @@ public class OperationGroupMasterListHelper extends CategoryOperationListHelper<
// クリアフラグをfalseにセット
ABVEnvironment.getInstance().setOperationGroupMasterClearFlg(false);
// 作業種別の選択画面を閉じる
mAppActivity.closeOperationGroupMasterDialog();
}
OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek();
mAppActivity.checkBatchNeedSyncButton(peekOperationGroupMasterDto.operationGroupMasterId);
int operationSortType = mAppActivity.getSortCondition();
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
// 作業種別IDで紐づく作業リストを取得
......@@ -155,4 +153,11 @@ public class OperationGroupMasterListHelper extends CategoryOperationListHelper<
public List<OperationGroupMasterDto> getChildList(Integer operationGroupMasterId) {
return mOperationGroupMasterDao.getOperationGroupMasterChildList(operationGroupMasterId);
}
public void refreshList() {
OperationListActivity operationListActivity = ActivityHandlingHelper.getInstance().getActivity(OperationListActivity.class);
if (operationListActivity != null) {
operationListActivity.screenRefresh();
}
}
}
......@@ -69,7 +69,7 @@ public abstract class OperationListHelper {
abstract protected List<OperationDto> findOperationList() throws Exception;
private List<OperationDto> filterOperationList() {
public List<OperationDto> filterOperationList() {
try {
operationDtoList = findOperationList();
} catch (Exception e) {
......@@ -245,15 +245,6 @@ public abstract class OperationListHelper {
}
/**
* 作業の画面更新
*/
public void refreshList() {
if (mAdapter != null) {
mAdapter.setItem(filterOperationList());
}
}
/**
* 作業の件数取得
* @return
*/
......
......@@ -23,6 +23,7 @@ public class ChatWebView extends WebView {
private final ChatWebViewActivity chatActivity;
private ChatData chatData;
public ChatWebViewDelegate delegate;
public ChatWebView(Context context) {
super(context);
......@@ -534,6 +535,21 @@ public class ChatWebView extends WebView {
return chatData.getRoomInfo();
}
@JavascriptInterface
public void showLoadingIndicator() {
if (delegate != null) {
delegate.chatWebViewNeedsShowProgressBar();
}
}
@JavascriptInterface
public void hideLoadingIndicator() {
if (delegate != null) {
delegate.chatWebViewNeedsDismissProgressBar();
}
}
public void loadChatViewUrl(final String urlString) {
post(new Runnable() {
@Override
......@@ -577,14 +593,6 @@ public class ChatWebView extends WebView {
loadUrl("javascript:penOff();");
}
public void showLoadingIndicator() {
loadChatViewUrl("javascript:Common.showLoadingIndicator();");
}
public void dismissLoadingIndicator() {
loadUrl("javascript:Common.dismissLoadingIndicator()");
}
public void refreshForOffline() {
loadUrl("javascript:Common.refreshForOffline();");
}
......@@ -632,8 +640,4 @@ public class ChatWebView extends WebView {
public void startAudioCollaboration() {
loadChatViewUrl(String.format("javascript:Common.startCollaboration('%s');", ABookCommConstants.FLAG.COLLABORATION_TYPE.AUDIO ));
}
public void refreshContactScreen() {
loadChatViewUrl("javascript:Common.refreshContactScreen();");
}
}
package jp.agentec.abook.abv.ui.home.view;
public interface ChatWebViewDelegate {
void chatWebViewNeedsShowProgressBar();
void chatWebViewNeedsDismissProgressBar();
}
......@@ -34,8 +34,6 @@ public class CommunicationWebViewActivity extends ABVAuthenticatedActivity {
private ProgressBar m_progress;
protected ContentDto mContentDto;
protected File mLocalFile;
public final static int ABOOK_CHECK_TASK_IMAGE = 103;
public final static int ABOOK_CHECK_TASK_VIDEO = 104;
@Override
protected void onDestroy() {
......
......@@ -76,7 +76,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import java.util.concurrent.ConcurrentHashMap;
import jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON;
......@@ -94,6 +93,7 @@ import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
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.exception.ExceptionHandler;
import jp.agentec.abook.abv.bl.common.log.Logger;
......@@ -119,7 +119,6 @@ import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.launcher.android.R.id;
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.AppColor;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
......@@ -137,8 +136,6 @@ import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVEditText;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.common.vo.Size;
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.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.Interface.MovePageInterface;
......@@ -1401,7 +1398,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
if (ContentJSON.KEY_PDF_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_NONE_TYPE.equals(contentDto.contentType)
|| ContentJSON.KEY_OTHER_TYPE.equals(contentDto.contentType)) {
mExitBtn.setBackgroundResource(R.drawable.btn_first_back);
mLinkOriginalBackBtn.setVisibility(View.VISIBLE);
mLinkOriginalBackBtn.setVisibility(View.GONE);
mHistoryBtn.setVisibility(View.GONE);
indexBtn.setVisibility(View.GONE);
mBtnMeetingRoomSetting.setVisibility(View.GONE);
......@@ -3829,6 +3826,15 @@ public class ContentViewActivity extends ABVContentViewActivity {
Uri[] result = null;
Uri dataUri = null;
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
finishActivity();
goChatRoom(intent, baseActivityName, ContentViewActivity.class.getName());
}
return;
}
if (intent != null && resultCode == RESULT_OK) {
String dataString = intent.getDataString();
if (dataString != null) {
......@@ -3842,9 +3848,9 @@ public class ContentViewActivity extends ABVContentViewActivity {
case WEBVIEW:
case PREVIEW:
isAnotherViewOpenFlg = false;
// playPageBGMSound(mCurrentPageNumber); //프리뷰 모드 일때 음악재생 Bug
//playPageBGMSound(mCurrentPageNumber); //프리뷰 모드 일때 음악재생 Bug
break;
case ABOOK_CHECK_TASK_IMAGE:
case ABookCommConstants.ABOOK_CHECK_TASK_IMAGE:
if (mUploadMessage == null) {
return;
}
......@@ -3865,7 +3871,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107);
}
break;
case ABOOK_CHECK_TASK_VIDEO:
case ABookCommConstants.ABOOK_CHECK_TASK_VIDEO:
if (mUploadMessage == null) {
return;
}
......
......@@ -23,6 +23,11 @@ import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import android.widget.Toast;
import android.app.DownloadManager;
import android.webkit.URLUtil;
import android.webkit.CookieManager;
import android.webkit.DownloadListener;
import android.os.Environment;
import java.util.ArrayList;
......@@ -32,6 +37,7 @@ import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
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.ABVDataCache;
......@@ -40,6 +46,8 @@ import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.download.ContentDownloader;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
......@@ -49,6 +57,7 @@ import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.adf.util.StringUtil;
//TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約
public class HTMLWebViewActivity extends ParentWebViewActivity {
......@@ -71,6 +80,8 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
private JsInf jsInf = new JsInf();
private ValueCallback<Uri[]> mUploadMessage;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
@Override
public void onCreate(Bundle savedInstanceState) {
Logger.i(TAG, "onCreate");
......@@ -119,8 +130,41 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応
//ターゲットバージョン30以上からデフォルトがfalseに設定されている問題対応
settings.setAllowFileAccess(true);
settings.setAllowContentAccess(true);
settings.setAllowUniversalAccessFromFileURLs(true);
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
webView.setDownloadListener(new DownloadListener() {
@Override
public void onDownloadStart(String url, String userAgent,
String contentDisposition, String mimetype,
long contentLength) {
DownloadManager.Request request = new DownloadManager.Request(
Uri.parse(url));
final String fileName = URLUtil.guessFileName(url, contentDisposition, mimetype);
request.setMimeType(mimetype);
//------------------------COOKIE!!------------------------
String cookies = CookieManager.getInstance().getCookie(url);
request.addRequestHeader("cookie", cookies);
//------------------------COOKIE!!------------------------
request.addRequestHeader("User-Agent", userAgent);
request.setTitle(fileName);
request.allowScanningByMediaScanner();
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); //Notify client once download is completed!
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName);
DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
if (dm != null) {
dm.enqueue(request);
}
Toast.makeText(getApplicationContext(), getString(R.string.download_start), //To notify the Client that the file is being downloaded
Toast.LENGTH_LONG).show();
}
});
final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar);
//fl.setVisibility(View.GONE);
// ***** 戻るボタン
closeButton.setOnClickListener(new View.OnClickListener() {
......@@ -219,10 +263,10 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
FileChooserParams fileChooserParams) {
boolean result = false;
if (fileChooserParams.getAcceptTypes()[0].toLowerCase().indexOf(ABookKeys.IMAGE) != -1) {
result = startCameraIntent(ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true);
result = startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true);
} else if (fileChooserParams.getAcceptTypes()[0].toLowerCase().indexOf(ABookKeys.VIDEO) != -1) {
result = startCameraIntent(ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
result = startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
}
if (result) {
......@@ -395,11 +439,13 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
printButtonActivityControl();
historyListBtn.setVisibility(View.GONE);
if (ContentJSON.KEY_LIST_TYPE.equals(mContentDto.contentType)) {
fl.setVisibility(View.GONE);
}
if (isLinkedContent) {
if (ContentJSON.KEY_MOVIE_TYPE.equals(mContentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(mContentDto.contentType)
|| ContentJSON.KEY_PANO_IMAGE_TYPE.equals(mContentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(mContentDto.contentType)
|| ContentJSON.KEY_OBJECTVR_TYPE.equals(mContentDto.contentType) || ContentJSON.KEY_OTHER_TYPE.equals(mContentDto.contentType)) {
closeButton.setBackgroundResource(R.drawable.btn_first_back);
btnLinkOriginalBack.setVisibility(View.VISIBLE);
btnWebBack.setVisibility(View.GONE);
......@@ -425,6 +471,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
subMenuBtn.setVisibility(View.GONE);
}
} else {
btnLinkOriginalBack.setVisibility(View.GONE);
configureRemote();
}
if (meetingManager.isCollaboration()) {
......@@ -476,6 +523,15 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
public void openEditPage() {
commonOpenEditPage();
}
@JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
}
@Override
......@@ -650,7 +706,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
Intent intent = new Intent();
intent.setClass(HTMLWebViewActivity.this, OnlineHTMLWebViewActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("LINKURL", AcmsApis.getApiUrl(ABVEnvironment.getInstance().acmsAddress, ABVDataCache.getInstance().getUrlPath(), AcmsApis.ApiQuickReportRevision));
intent.putExtra("LINKURL", AcmsApis.getApiUrl(ABVEnvironment.getInstance().acmsAddress, ABVDataCache.getInstance().getUrlPath(), AcmsApis.ApiQuickReportRevision) + "?isNative=1");
intent.putExtra("operationId", mOperationId);
startActivity(intent, NaviConsts.Right);
}
......@@ -683,8 +739,22 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
protected void onActivityResult(int requestCode, int resultCode, final Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
if(mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
// 360編集をしている場合
callUnloadAuth();
}
finishActivity();
goChatRoom(intent, baseActivityName, HTMLWebViewActivity.class.getName());
}
return;
}
Uri[] result = null;
Uri dataUri = null;
if (intent != null && resultCode == RESULT_OK) {
......@@ -695,7 +765,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
}
}
if (requestCode == ABOOK_CHECK_TASK_IMAGE) {
if (requestCode == ABookCommConstants.ABOOK_CHECK_TASK_IMAGE) {
if (mUploadMessage == null) {
return;
}
......@@ -715,12 +785,12 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
mUploadMessage.onReceiveValue(null);
ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107);
}
} else if (requestCode == ABOOK_CHECK_TASK_VIDEO) {
} else if (requestCode == ABookCommConstants.ABOOK_CHECK_TASK_VIDEO) {
if (mUploadMessage == null) {
return;
}
mUploadMessage.onReceiveValue(result);
} else if (requestCode == ABOOK_CHECK_SELECT_SCENE) {
} else if (requestCode == ABookCommConstants.ABOOK_CHECK_SELECT_SCENE) {
if (intent != null && result != null) {
confirmEntrySceneDialog(result[0]);
}
......
......@@ -17,6 +17,14 @@ import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import android.widget.Toast;
import android.app.DownloadManager;
import android.webkit.URLUtil;
import android.webkit.CookieManager;
import android.webkit.DownloadListener;
import android.os.Environment;
import android.webkit.WebViewClient;
import android.content.Context;
import android.graphics.Bitmap;
import org.xwalk.core.XWalkNavigationHistory;
import org.xwalk.core.XWalkPreferences;
......@@ -26,17 +34,24 @@ import org.xwalk.core.XWalkUIClient;
import org.xwalk.core.XWalkView;
import org.xwalk.core.XWalkWebResourceRequest;
import org.xwalk.core.XWalkWebResourceResponse;
import org.xwalk.core.XWalkDownloadListener;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.ArrayList;
import java.util.List;
import java.io.File;
import java.io.FileOutputStream;
import java.util.Objects;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
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;
......@@ -44,9 +59,11 @@ import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.download.ContentDownloader;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic;
import jp.agentec.abook.abv.bl.logic.ContractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
......@@ -72,6 +89,8 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
private int objectLogId;
private XWalkView webView;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private HTMLXWalkWebViewActivity.JsInf jsInf = new HTMLXWalkWebViewActivity.JsInf();
private Integer lastPageNo = 0;
......@@ -123,6 +142,36 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true); //デバッグモード(chromeからinspect可)
}
webView.setDownloadListener(new XWalkDownloadListener(this) {
@Override
public void onDownloadStart(String url, String userAgent,
String contentDisposition, String mimetype,
long contentLength) {
DownloadManager.Request request = new DownloadManager.Request(
Uri.parse(url));
final String fileName = URLUtil.guessFileName(url, contentDisposition, mimetype);
request.setMimeType(mimetype);
//------------------------COOKIE!!------------------------
String cookies = CookieManager.getInstance().getCookie(url);
request.addRequestHeader("cookie", cookies);
//------------------------COOKIE!!------------------------
request.addRequestHeader("User-Agent", userAgent);
request.setTitle(fileName);
request.allowScanningByMediaScanner();
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); //Notify client once download is completed!
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName);
DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
if (dm != null) {
dm.enqueue(request);
}
Toast.makeText(getApplicationContext(), getString(R.string.download_start), //To notify the Client that the file is being downloaded
Toast.LENGTH_LONG).show();
}
});
final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar);
// ***** 戻るボタン
......@@ -224,9 +273,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(ABookCommConstants.ABOOK_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(ABookCommConstants.ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
}
mUploadMessage = uploadFile;
if (result) {
......@@ -442,7 +491,10 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
configureRemote();
}
});
historyListBtn.setVisibility(View.GONE);
if (ContentJSON.KEY_LIST_TYPE.equals(mContentDto.contentType)) {
fl.setVisibility(View.GONE);
}
if(isLinkedContent) {
if (ContentJSON.KEY_MOVIE_TYPE.equals(mContentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(mContentDto.contentType)
|| ContentJSON.KEY_PANO_IMAGE_TYPE.equals(mContentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(mContentDto.contentType)
......@@ -532,6 +584,15 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
public void openEditPage() {
commonOpenEditPage();
}
@org.xwalk.core.JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
}
@Override
......@@ -713,7 +774,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 == ABookCommConstants.ABOOK_CHECK_TASK_IMAGE) {
if (mUploadMessage == null) {
return;
}
......@@ -729,13 +790,13 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
mUploadMessage.onReceiveValue(null);
ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107);
}
} else if (requestCode == ABOOK_CHECK_TASK_VIDEO) {
} else if (requestCode == ABookCommConstants.ABOOK_CHECK_TASK_VIDEO) {
if (mUploadMessage == null) {
return;
}
// 動画
mUploadMessage.onReceiveValue(result);
} else if (requestCode == ABOOK_CHECK_SELECT_SCENE) {
} else if (requestCode == ABookCommConstants.ABOOK_CHECK_SELECT_SCENE) {
if (intent != null && result != null) {
confirmEntrySceneDialog(result);
}
......
package jp.agentec.abook.abv.ui.viewer.activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
......@@ -12,17 +13,16 @@ import android.widget.ImageButton;
import java.util.ArrayList;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.appinfo.options.Options;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.StringUtil;
// TODO: later 遠隔連動関連はContentView,HTMLWebViewと共通しているので要集約
public class NoPdfViewActivity extends ABVContentViewActivity {
......@@ -209,4 +209,17 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
layout.addView(view);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, requestCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
finishActivity();
goChatRoom(intent, baseActivityName, getClass().getName());
}
return;
}
}
}
......@@ -147,7 +147,7 @@ public class FoxitPdfCore {
* @throws PDFException
*/
public PointF getPageSize(int pageIndex) throws PDFException {
Logger.i("getPageSize : " + pageIndex);
Logger.d("getPageSize : " + pageIndex);
PDFPage pdfPage = mPDFDoc.getPage(pageIndex);
return new PointF(pdfPage.getWidth(), pdfPage.getHeight());
}
......@@ -165,7 +165,7 @@ public class FoxitPdfCore {
* @return
*/
public Bitmap drawPage(int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH) {
Logger.i(TAG, "drawPage start.");
Logger.d(TAG, "drawPage start.");
synchronized (mContext) {
Bitmap bm = Bitmap.createBitmap(patchW, patchH, Bitmap.Config.ARGB_8888);
PDFPage pdfPage = loadPage(mPDFDoc, page, PDFPage.e_ParsePageNormal);
......@@ -198,7 +198,7 @@ public class FoxitPdfCore {
Logger.e(TAG, "Failed to render the page No.%d! %s", page, e.getMessage());
}
Logger.i(TAG, "drawPage end.");
Logger.d(TAG, "drawPage end.");
return bm;
}
}
......
......@@ -264,7 +264,7 @@ public class PdfImageProvider {
Logger.d(TAG, "setPauseTask " + ste.getClassName() + "#" + ste.getMethodName() + " " + pauseTask);
}
else {
Logger.i(TAG, "setPauseTask " + pauseTask);
Logger.d(TAG, "setPauseTask " + pauseTask);
}
if (pauseTask) {
pauseTaskCount++;
......@@ -307,7 +307,7 @@ public class PdfImageProvider {
int width = (int) (size.x * pageScale);
int height = (int) (size.y * pageScale);
Logger.i(TAG, "[drawPage]: pageNumber=" + pageNumber + " width=" + width + " height=" + height + " imagePath=" + imagePath);
Logger.d(TAG, "[drawPage]: pageNumber=" + pageNumber + " width=" + width + " height=" + height + " imagePath=" + imagePath);
Bitmap bm = null;
try {
bm = mFoxitPdfCore.drawPage(pageNumber, width, height, 0, 0, width, height);
......
......@@ -86,8 +86,7 @@ public class AudioPlayView extends RelativeLayout {
if (StringUtil.isNullOrEmpty(contentName)) { // オーサリング動画の場合
LinearLayout linearLayout1 = (LinearLayout)controlLayout.findViewById(R.id.linear1);
linearLayout1.setVisibility(View.GONE);
}
else { // 動画コンテンツの場合
} else { // 動画コンテンツの場合
TextView txtTitle = (TextView)controlLayout.findViewById(R.id.txtTitle);
txtTitle.setText(contentName);
......@@ -192,8 +191,7 @@ public class AudioPlayView extends RelativeLayout {
if (mMediaPlayer.isPlaying()) {
mBtnPlay.setImageDrawable(getResources().getDrawable(R.drawable.btn_play));
pause();
}
else{
} else{
mBtnPlay.setImageDrawable(getResources().getDrawable(R.drawable.btn_pause));
restart();
}
......@@ -214,8 +212,7 @@ public class AudioPlayView extends RelativeLayout {
position = 0;
}
jump(position);
}
else {
} else {
btnBackward.setImageDrawable(getResources().getDrawable(R.drawable.btn_backward));
}
return false;
......@@ -236,8 +233,7 @@ public class AudioPlayView extends RelativeLayout {
position = duration;
}
jump(position);
}
else {
} else {
btnForward.setImageDrawable(getResources().getDrawable(R.drawable.btn_forward));
}
return false;
......@@ -272,8 +268,7 @@ public class AudioPlayView extends RelativeLayout {
LinearLayout.LayoutParams params;
if (config.orientation == Configuration.ORIENTATION_LANDSCAPE && !isMobile) {
params = new LinearLayout.LayoutParams((int) (density * 500), ViewGroup.LayoutParams.WRAP_CONTENT);
}
else {
} else {
params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
......@@ -285,8 +280,7 @@ public class AudioPlayView extends RelativeLayout {
if (isMobile && point.x < point.y) { // モバイルで縦長の場合、戻り・早送りはなし
btnBackward.setVisibility(View.GONE);
btnForward.setVisibility(View.GONE);
}
else {
} else {
btnBackward.setVisibility(View.VISIBLE);
btnForward.setVisibility(View.VISIBLE);
}
......@@ -401,6 +395,10 @@ public class AudioPlayView extends RelativeLayout {
public void stop() {
if (mMediaPlayer != null) {
mVisualizer.release();
if (mMediaPlayer.isPlaying()){
mMediaPlayer.stop();
}
mMediaPlayer.reset();
mMediaPlayer.release();
mMediaPlayer = null;
}
......
......@@ -20,15 +20,20 @@ import android.widget.RelativeLayout;
import org.json.adf.JSONObject;
import java.util.ArrayList;
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;
import jp.agentec.abook.abv.bl.data.dao.TaskDao;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationTaskDto;
import jp.agentec.abook.abv.bl.dto.TaskDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
......@@ -67,6 +72,8 @@ public class OperationTaskLayout extends RelativeLayout {
private ContentViewActivity mContext;
private JsInf jsInf = new JsInf();
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private static TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
public OperationTaskLayout(final Context context, final long contentId, final String linkUrl, boolean isNormalSize) {
......@@ -131,10 +138,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) {
......@@ -554,5 +561,14 @@ public class OperationTaskLayout extends RelativeLayout {
public void openEditPage() {
((ABVContentViewActivity) OperationTaskLayout.this.mContext).commonOpenEditPage();
}
@JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mContext.mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
}
}
......@@ -38,12 +38,12 @@ app_versioncode=1
# abvEnvironments.xml
#cms server
acms_address=https://check.abookcloud.com/acms
download_server_address=https://check.abookcloud.com/acms
acms_address=https://check130.agentec.jp/acms
download_server_address=https://check130.agentec.jp/acms
#syncview server
websocket_server_http_url=https://checkdev1.agentec.jp/v1
websocket_server_ws_url=wss://checkdev1.agentec.jp/v1
websocket_server_http_url=https://check130.agentec.jp/v1
websocket_server_ws_url=wss://check130.agentec.jp/v1
#WebSocket debug出力
websocket_debug=false
......@@ -86,8 +86,8 @@ is_check_invalid_passward_limit=true
repeat_default=true
#Setting Info(設定画面のABookについての設定情報)
version_name=1.3.201
release_date=2021/07/06
version_name=1.4.100
release_date=2021/07/29
copy_right=2016 AGENTEC Co.,Ltd. All rights reserved.
hope_page=http://www.agentec.jp
contact_email=abook-appsupport@agentec.jp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment