Commit cb3f49e0 by yuichiro ogawa

チャット機能 サービスオプション化対応

parent 2ed6b474
package jp.agentec.abook.abv.bl.acms.type; package jp.agentec.abook.abv.bl.acms.type;
import jp.agentec.abook.abv.bl.logic.ContractLogic;
public interface ServiceOption { public interface ServiceOption {
interface ServiceOptionId { interface ServiceOptionId {
/** /**
...@@ -158,5 +156,11 @@ public interface ServiceOption { ...@@ -158,5 +156,11 @@ public interface ServiceOption {
* 利用しない:N(通常)、利用する:Y * 利用しない:N(通常)、利用する:Y
*/ */
int AddUserPasswordSalt = 181; int AddUserPasswordSalt = 181;
/**
* チャット機能
* 利用しない:N(通常)、利用する:Y
*/
int Chat = 183;
} }
} }
\ No newline at end of file
package jp.agentec.abook.abv.bl.data; package jp.agentec.abook.abv.bl.data;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -336,6 +335,10 @@ public class ABVDataCache { ...@@ -336,6 +335,10 @@ public class ABVDataCache {
return isServiceOptionEnable(ServiceOptionId.PanoImage); return isServiceOptionEnable(ServiceOptionId.PanoImage);
} }
public boolean isChat() {
return isServiceOptionEnable(ServiceOptionId.Chat);
}
/** /**
* @version 1.2.300 * @version 1.2.300
* サービスオプション(ユーザパスワードソルト付加)返す * サービスオプション(ユーザパスワードソルト付加)返す
......
...@@ -5,47 +5,29 @@ import android.content.ActivityNotFoundException; ...@@ -5,47 +5,29 @@ import android.content.ActivityNotFoundException;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color; import android.graphics.Color;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.text.InputType; import android.text.InputType;
import android.view.Gravity;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.Window; import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.Button; import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.CheckedTextView;
import android.widget.EditText; import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.ListView; import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.RadioGroup; import android.widget.RadioGroup;
import android.widget.ScrollView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.google.firebase.iid.FirebaseInstanceId; import com.google.firebase.iid.FirebaseInstanceId;
import com.google.zxing.WriterException;
import org.xwalk.core.XWalkView;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
...@@ -53,10 +35,7 @@ import java.util.concurrent.Executors; ...@@ -53,10 +35,7 @@ import java.util.concurrent.Executors;
import jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON; import jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON; import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.DeliveryType;
import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType; import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType;
import jp.agentec.abook.abv.bl.acms.type.LoginMode;
import jp.agentec.abook.abv.bl.acms.type.UpdateSelect;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.CommonExecutor; import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant; import jp.agentec.abook.abv.bl.common.Constant;
...@@ -72,11 +51,9 @@ import jp.agentec.abook.abv.bl.common.util.ContentFileUtil; ...@@ -72,11 +51,9 @@ import jp.agentec.abook.abv.bl.common.util.ContentFileUtil;
import jp.agentec.abook.abv.bl.data.ABVDataCache; 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.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao; import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.data.dao.MemberInfoDao;
import jp.agentec.abook.abv.bl.data.dao.OperationDao; import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.download.ContentDownloadListener; import jp.agentec.abook.abv.bl.download.ContentDownloadListener;
import jp.agentec.abook.abv.bl.download.ContentDownloader; import jp.agentec.abook.abv.bl.download.ContentDownloader;
import jp.agentec.abook.abv.bl.download.ContentFileExtractor;
import jp.agentec.abook.abv.bl.download.ContentRefresher; import jp.agentec.abook.abv.bl.download.ContentRefresher;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification; import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
...@@ -85,19 +62,12 @@ import jp.agentec.abook.abv.bl.dto.OperationDto; ...@@ -85,19 +62,12 @@ import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto; import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.BookmarkLogic; import jp.agentec.abook.abv.bl.logic.BookmarkLogic;
import jp.agentec.abook.abv.bl.logic.CategoryLogic;
import jp.agentec.abook.abv.bl.logic.ContentLogic;
import jp.agentec.abook.abv.bl.logic.ContractLogic; import jp.agentec.abook.abv.bl.logic.ContractLogic;
import jp.agentec.abook.abv.bl.logic.GroupLogic;
import jp.agentec.abook.abv.bl.logic.MemoLogic; import jp.agentec.abook.abv.bl.logic.MemoLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic; import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.bl.logic.UserAuthenticateLogic; import jp.agentec.abook.abv.bl.logic.UserAuthenticateLogic;
import jp.agentec.abook.abv.cl.billing.Purchase;
import jp.agentec.abook.abv.cl.helper.ABVUncaughtExceptionHandler; import jp.agentec.abook.abv.cl.helper.ABVUncaughtExceptionHandler;
import jp.agentec.abook.abv.cl.util.AndroidStringUtil;
import jp.agentec.abook.abv.cl.util.BitmapUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil; import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.cl.util.RawResourceUtil;
import jp.agentec.abook.abv.cl.util.StorageUtil; import jp.agentec.abook.abv.cl.util.StorageUtil;
import jp.agentec.abook.abv.launcher.android.ABVApplication; import jp.agentec.abook.abv.launcher.android.ABVApplication;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
...@@ -117,17 +87,14 @@ import jp.agentec.abook.abv.ui.common.util.KeyboardUtils; ...@@ -117,17 +87,14 @@ 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.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView; import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView;
import jp.agentec.abook.abv.ui.common.vo.Size; import jp.agentec.abook.abv.ui.common.vo.Size;
import jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity;
import jp.agentec.abook.abv.ui.home.activity.HelpActivity; 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.LoginActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.activity.SplashScreenActivity;
import jp.agentec.abook.abv.ui.home.adapter.FixPushMessageAdapter; 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.OperationSelectAdapter;
import jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter; import jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.ContentViewHelper; import jp.agentec.abook.abv.ui.home.helper.ContentViewHelper;
import jp.agentec.abook.abv.ui.viewer.foxitPdf.PdfImageProvider;
import jp.agentec.adf.net.http.HttpDownloadSimpleNotification; import jp.agentec.adf.net.http.HttpDownloadSimpleNotification;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
...@@ -893,19 +860,23 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -893,19 +860,23 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// chat // chat
LinearLayout ll_menuItem_chat = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_chat); LinearLayout ll_menuItem_chat = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_chat);
ll_menuItem_chat.setOnClickListener(new View.OnClickListener() { if (ABVDataCache.getInstance().serviceOption.isChat()) {
@Override ll_menuItem_chat.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) { @Override
// チャット利用のはネットワークが繋がる時のみ public void onClick(View view) {
if (ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) { // チャット利用のはネットワークが繋がる時のみ
ActivityHandlingHelper.getInstance().startChatWebviewActivity(); if (ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
mCommunicationMenuDialog.dismiss(); ActivityHandlingHelper.getInstance().startChatWebviewActivity();
} else { mCommunicationMenuDialog.dismiss();
ABVToastUtil.showMakeText(getABVApplication().getBaseContext(), R.string.request_network_connection, Toast.LENGTH_SHORT); } else {
return; ABVToastUtil.showMakeText(getABVApplication().getBaseContext(), R.string.request_network_connection, Toast.LENGTH_SHORT);
return;
}
} }
} });
}); } else {
ll_menuItem_chat.setVisibility(View.GONE);
}
mCommunicationMenuDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() { mCommunicationMenuDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override @Override
......
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