Commit f7f0d433 by onuma

Task #42647 OS10 で THETAが認識されない。

parent f443fdba
...@@ -134,19 +134,6 @@ android { ...@@ -134,19 +134,6 @@ android {
abiFilters "arm64-v8a", "" abiFilters "arm64-v8a", ""
} }
} }
x86 {
versionCode defaultConfig.versionCode + 2
ndk {
abiFilters "x86", ""
}
}
x86_64 {
versionCode defaultConfig.versionCode + 3
ndk {
abiFilters "x86_64", ""
}
}
} }
} }
} }
......
...@@ -6,7 +6,7 @@ buildscript { ...@@ -6,7 +6,7 @@ buildscript {
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
compileSdkVersion 26 compileSdkVersion 29
buildToolsVersion '28.0.3' buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
......
...@@ -26,7 +26,7 @@ dependencies { ...@@ -26,7 +26,7 @@ dependencies {
} }
android { android {
compileSdkVersion 26 compileSdkVersion 29
buildToolsVersion '28.0.3' buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
......
...@@ -47,6 +47,7 @@ public class ThetaHelper { ...@@ -47,6 +47,7 @@ public class ThetaHelper {
* @return true:接続成功、false:接続失敗 * @return true:接続成功、false:接続失敗
*/ */
public boolean connectThetaCameraWifi(int networkId) { public boolean connectThetaCameraWifi(int networkId) {
Logger.i(TAG,"connectThetaCameraWifi : " + networkId);
WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE); WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager == null) { if (wifiManager == null) {
Logger.e(TAG, "wifiManager == null"); Logger.e(TAG, "wifiManager == null");
...@@ -66,6 +67,7 @@ public class ThetaHelper { ...@@ -66,6 +67,7 @@ public class ThetaHelper {
* @return networkIdを返す(-1は失敗) * @return networkIdを返す(-1は失敗)
*/ */
public int saveThetaCameraWifi(String ssid) { public int saveThetaCameraWifi(String ssid) {
Logger.i(TAG, "saveThetaCameraWifi : " + ssid);
WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE); WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager == null) { if (wifiManager == null) {
Logger.e(TAG, "wifiManager == null"); Logger.e(TAG, "wifiManager == null");
...@@ -107,6 +109,7 @@ public class ThetaHelper { ...@@ -107,6 +109,7 @@ public class ThetaHelper {
* @return 存在有無(true:存在する,false:存在しない) * @return 存在有無(true:存在する,false:存在しない)
*/ */
private boolean checkWifiNetwork(String ssid) { private boolean checkWifiNetwork(String ssid) {
Logger.i(TAG,"checkWifiNetwork : " + ssid);
WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE); WifiManager wifiManager = (WifiManager)mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager == null) { if (wifiManager == null) {
Logger.e(TAG, "wifiManager == null"); Logger.e(TAG, "wifiManager == null");
...@@ -118,7 +121,7 @@ public class ThetaHelper { ...@@ -118,7 +121,7 @@ public class ThetaHelper {
for (ScanResult scanResult : wifiManager.getScanResults()) { for (ScanResult scanResult : wifiManager.getScanResults()) {
String scanResultSSID = scanResult.SSID.replace("\"", ""); String scanResultSSID = scanResult.SSID.replace("\"", "");
int index = scanResultSSID.indexOf(ssid); int index = scanResultSSID.indexOf(ssid);
Logger.d(TAG, "scanResultSSID = " + scanResultSSID); Logger.i(TAG, "scanResultSSID = " + scanResultSSID);
if (index != -1) { if (index != -1) {
hasWifiList = true; hasWifiList = true;
} }
...@@ -131,7 +134,7 @@ public class ThetaHelper { ...@@ -131,7 +134,7 @@ public class ThetaHelper {
* @param ssid アクセスポイント * @param ssid アクセスポイント
* @return 接続パスワード * @return 接続パスワード
*/ */
private String getPassword(String ssid) { public static String getPassword(String ssid) {
String password = ssid.replace("THETA",""); String password = ssid.replace("THETA","");
password = password.replace(".OSC",""); password = password.replace(".OSC","");
return password.substring(2); return password.substring(2);
...@@ -216,6 +219,7 @@ public class ThetaHelper { ...@@ -216,6 +219,7 @@ public class ThetaHelper {
* @return true:接続状態、false:非接続状態 * @return true:接続状態、false:非接続状態
*/ */
public boolean checkThetaCameraWifiConnected(@NonNull WifiManager wifiManager) { public boolean checkThetaCameraWifiConnected(@NonNull WifiManager wifiManager) {
Logger.i(TAG,"--- checkThetaCameraWifiConnected");
List<ScanResult> results = wifiManager.getScanResults(); List<ScanResult> results = wifiManager.getScanResults();
boolean isConnected = false; boolean isConnected = false;
for (ScanResult scanResult : results) { for (ScanResult scanResult : results) {
...@@ -247,48 +251,38 @@ public class ThetaHelper { ...@@ -247,48 +251,38 @@ public class ThetaHelper {
* THETAカメラWi-Fiと非接続 * THETAカメラWi-Fiと非接続
*/ */
public void disConnectThetaCameraWifi(WifiManager wifiManager) { public void disConnectThetaCameraWifi(WifiManager wifiManager) {
Logger.i(TAG,"--- disConnectThetaCameraWifi");
//既存接続中のネットワーク切断 //既存接続中のネットワーク切断
WifiInfo wifi_inf = wifiManager.getConnectionInfo(); WifiInfo wifi_inf = wifiManager.getConnectionInfo();
if (wifi_inf.getNetworkId() != -1 ) { if (wifi_inf.getNetworkId() != -1 ) {
wifiManager.disableNetwork(wifi_inf.getNetworkId()); wifiManager.disableNetwork(wifi_inf.getNetworkId());
wifiManager.disconnect(); wifiManager.disconnect();
} }
//通常Wi-Fi再接続処理 wifiManager.disconnect();
// boolean disconnect = true; }
// for (WifiConfiguration configuration : wifiManager.getConfiguredNetworks()) {
// if (wifi_inf.getNetworkId() == configuration.networkId) { public static ConnectivityManager.NetworkCallback networkCallback_ = new ConnectivityManager.NetworkCallback() {
// String packageName = mContext.getPackageName(); @Override
// int result = configuration.toString().indexOf(packageName); public void onAvailable(@NonNull Network network) {
// if (result != -1) { super.onAvailable(network);
// disconnect = false; }
// break;
// } @Override
// } public void onLost(@NonNull Network network) {
// } super.onLost(network);
// if (disconnect) { }
// //一番近くにあるの通常Wi-Fiに接続
// List<ScanResult> results = wifiManager.getScanResults(); @Override
// int level = 0; public void onUnavailable() {
// int networkId = -1; super.onUnavailable();
// for (WifiConfiguration configuration : wifiManager.getConfiguredNetworks()) { }
// int index = configuration.SSID.indexOf(ABookValues.THETA_MODEL_NAME_THETA); };
// if (index != -1) {
// continue; public static ConnectivityManager.NetworkCallback getNetworkCallback(){
// } if (networkCallback_ == null) {
// for (ScanResult scanResult : results) { networkCallback_ = new ConnectivityManager.NetworkCallback();
// if (configuration.SSID.indexOf(scanResult.SSID) != -1) { }
// if (level == 0 || WifiManager.compareSignalLevel(level, scanResult.level) < 0) { return networkCallback_;
// level = scanResult.level;
// networkId = configuration.networkId;
// }
// break;
// }
// }
// }
// if (networkId != -1) {
// wifiManager.enableNetwork(networkId, true);
// }
// }
} }
...@@ -316,6 +310,7 @@ public class ThetaHelper { ...@@ -316,6 +310,7 @@ public class ThetaHelper {
* ConnectivityManagerを利用してアプリ(プロセス)全体のネットワークを解除する。 * ConnectivityManagerを利用してアプリ(プロセス)全体のネットワークを解除する。
*/ */
public void appConnectedWifiDefault() { public void appConnectedWifiDefault() {
Logger.i(TAG,"---- appConnectedWifiDefault");
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
ConnectivityManager connectivityManager = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); ConnectivityManager connectivityManager = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectivityManager != null) { if (connectivityManager != null) {
......
...@@ -10,10 +10,13 @@ import java.io.IOException; ...@@ -10,10 +10,13 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.Properties; import java.util.Properties;
import jp.agentec.abook.abv.bl.common.log.Logger;
/** /**
* Input stream for motion JPEG data * Input stream for motion JPEG data
*/ */
public class MJpegInputStream extends DataInputStream { public class MJpegInputStream extends DataInputStream {
private static final String TAG = "MJpegInputStream";
private final byte[] SOI_MARKER = {(byte) 0xFF, (byte) 0xD8}; private final byte[] SOI_MARKER = {(byte) 0xFF, (byte) 0xD8};
private final byte[] EOF_MARKER = {(byte) 0xFF, (byte) 0xD9}; private final byte[] EOF_MARKER = {(byte) 0xFF, (byte) 0xD9};
private final static String CONTENT_LENGTH = "Content-Length"; private final static String CONTENT_LENGTH = "Content-Length";
...@@ -77,13 +80,17 @@ public class MJpegInputStream extends DataInputStream { ...@@ -77,13 +80,17 @@ public class MJpegInputStream extends DataInputStream {
properties.load(bais); properties.load(bais);
return Integer.parseInt(properties.getProperty(CONTENT_LENGTH)); return Integer.parseInt(properties.getProperty(CONTENT_LENGTH));
} }
private int systemCount_ = 0;
/** /**
* Acquire image data for 1 frame * Acquire image data for 1 frame
* @return Image data for 1 frame * @return Image data for 1 frame
* @throws IOException * @throws IOException
*/ */
public Bitmap readMJpegFrame() throws IOException { public Bitmap readMJpegFrame() throws IOException {
if (systemCount_%10 == 0) {
Logger.i(TAG, "--- readMJpegFrame");
}
systemCount_++;
mark(FRAME_MAX_LENGTH); mark(FRAME_MAX_LENGTH);
int headerLength = getStartOfSequence(this, SOI_MARKER); int headerLength = getStartOfSequence(this, SOI_MARKER);
int contentLength; int contentLength;
......
...@@ -25,7 +25,23 @@ public class PreferenceUtil { ...@@ -25,7 +25,23 @@ public class PreferenceUtil {
public static boolean get(Context context, String key, boolean def) { public static boolean get(Context context, String key, boolean def) {
return getPref(context).getBoolean(key, def); return getPref(context).getBoolean(key, def);
} }
/**
* SharedPreference から、指定のキーで値をとりだす。String[]
* @param context
* @param key キー
* @return String[] 、データがなければnull
*/
public static String[] get(Context context , String key) {
SharedPreferences prefs = getUserPreference(context);
String result = prefs.getString(key,"");
if (result.length() > 0) {
return result.split(",");
}
return null;
}
public static boolean contains(Context context, String key) { public static boolean contains(Context context, String key) {
return getPref(context).contains(key); return getPref(context).contains(key);
} }
...@@ -41,6 +57,26 @@ public class PreferenceUtil { ...@@ -41,6 +57,26 @@ public class PreferenceUtil {
public static void put(Context context, String key, String val) { public static void put(Context context, String key, String val) {
getEditor(context).putString(key, val).commit(); getEditor(context).putString(key, val).commit();
} }
/**
* SharedPreference に String[] で値を保存します。
* @param context
* @param key キー
* @param vals 保存する値 String[]
*/
public static void put(Context context, String key, String[] vals) {
StringBuffer buffer = new StringBuffer();
String stringItem;
for(String val : vals){
buffer.append(val + ",");
};
String buf = buffer.toString();
stringItem = buf.substring(0, buf.length() - 1);
SharedPreferences prefs = getUserPreference(context);
Editor editor = prefs.edit();
editor.putString(key, stringItem).commit();
}
public static void clear(Context context) { public static void clear(Context context) {
getEditor(context).clear().commit(); getEditor(context).clear().commit();
......
...@@ -534,6 +534,7 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity { ...@@ -534,6 +534,7 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
* @return true:有効, false:無効 * @return true:有効, false:無効
*/ */
protected boolean deviceWifiEnable() { protected boolean deviceWifiEnable() {
Logger.i(TAG,"--------- deviceWifiEnable");
if (DeviceInfo.isDeviceWifiEnabled(this)) { if (DeviceInfo.isDeviceWifiEnabled(this)) {
return true; return true;
} else { } else {
......
...@@ -25,6 +25,7 @@ public interface AppDefType { ...@@ -25,6 +25,7 @@ public interface AppDefType {
String CURSOR_ENABLE = "cursorEnable"; String CURSOR_ENABLE = "cursorEnable";
String DISPLAY_MARKING = "displayMarking"; String DISPLAY_MARKING = "displayMarking";
String APP_VERSIONUP_PROCESSING = "appVersionProcessingFlag"; String APP_VERSIONUP_PROCESSING = "appVersionProcessingFlag";
String THETA_SSID_STRING = "THETA_SSID";
} }
interface UserPrefKey { interface UserPrefKey {
......
...@@ -1884,6 +1884,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1884,6 +1884,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* THETAカメラと接続が切れたときにTHETA関連Activityをすべて終了させる * THETAカメラと接続が切れたときにTHETA関連Activityをすべて終了させる
*/ */
public synchronized void finishAllThetaActivity() { public synchronized void finishAllThetaActivity() {
Logger.i(TAG,"---- finishAllThetaActivity");
for (ABVAuthenticatedActivity activity : currentActivityStack) { for (ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof ThetaActivity) { if (activity instanceof ThetaActivity) {
activity.finish(); activity.finish();
......
...@@ -5,12 +5,15 @@ import android.content.Context; ...@@ -5,12 +5,15 @@ import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.wifi.WifiManager; import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import com.theta.helper.ThetaHelper; import com.theta.helper.ThetaHelper;
import jp.agentec.abook.abv.bl.common.Constant; import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity; import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
...@@ -40,11 +43,13 @@ public class ThetaActivity extends ABVUIActivity { ...@@ -40,11 +43,13 @@ public class ThetaActivity extends ABVUIActivity {
BroadcastReceiver wifiReceiver = new BroadcastReceiver() { BroadcastReceiver wifiReceiver = new BroadcastReceiver() {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
Logger.i(TAG,"---- wifiReceiver onReceive");
unregisterReceiver(wifiReceiver); unregisterReceiver(wifiReceiver);
boolean isConnected = mThetaHelper.checkThetaCameraWifiConnected(mWifiManager); boolean isConnected = mThetaHelper.checkThetaCameraWifiConnected(mWifiManager);
closeProgressPopup(); closeProgressPopup();
//THETAカメラ画面閉じる //THETAカメラ画面閉じる
if (mWifiScanType == Constant.WifiScanType.CloseCameraActivity) { if (mWifiScanType == Constant.WifiScanType.CloseCameraActivity) {
isConnected = true;
if (isConnected) { if (isConnected) {
mThetaHelper.disConnectThetaCameraWifi(mWifiManager); mThetaHelper.disConnectThetaCameraWifi(mWifiManager);
} }
...@@ -89,6 +94,7 @@ public class ThetaActivity extends ABVUIActivity { ...@@ -89,6 +94,7 @@ public class ThetaActivity extends ABVUIActivity {
* Wi-Fiが接続状態かチェックする。 * Wi-Fiが接続状態かチェックする。
*/ */
protected void closeThetaCameraActivity() { protected void closeThetaCameraActivity() {
Logger.i(TAG,"---- closeThetaCameraActivity");
showProgressPopup(); showProgressPopup();
//現在接続状態なのかチェック //現在接続状態なのかチェック
registerReceiver(wifiReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)); registerReceiver(wifiReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
......
...@@ -62,7 +62,7 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -62,7 +62,7 @@ public class ThetaCameraActivity extends ThetaActivity {
closeBtn.setOnClickListener(new View.OnClickListener() { closeBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.v(TAG, "CloseBtn.onClick"); Logger.i(TAG, "--- CloseBtn.onClick");
buttonDoubleTapControl(closeBtn); buttonDoubleTapControl(closeBtn);
mLiveView.stopPlay(); mLiveView.stopPlay();
if (deviceWifiEnable()) { if (deviceWifiEnable()) {
...@@ -78,6 +78,7 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -78,6 +78,7 @@ public class ThetaCameraActivity extends ThetaActivity {
mShootBtn.setOnClickListener(new View.OnClickListener() { mShootBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG, "--- mShootBtn.onClick");
buttonDoubleTapControl(mShootBtn); buttonDoubleTapControl(mShootBtn);
showProgressPopup(); showProgressPopup();
new ShootTask(ThetaCameraActivity.this).execute(); new ShootTask(ThetaCameraActivity.this).execute();
...@@ -91,6 +92,7 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -91,6 +92,7 @@ public class ThetaCameraActivity extends ThetaActivity {
mImageListBtn.setOnClickListener(new View.OnClickListener() { mImageListBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG, "--- mImageListBtn.onClick");
buttonDoubleTapControl(mImageListBtn); buttonDoubleTapControl(mImageListBtn);
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClassName(getPackageName(), ThetaImageListActivity.class.getName()); intent.setClassName(getPackageName(), ThetaImageListActivity.class.getName());
...@@ -232,6 +234,7 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -232,6 +234,7 @@ public class ThetaCameraActivity extends ThetaActivity {
* @param fileId ファイルID * @param fileId ファイルID
*/ */
public void shootTaskFinish(final String fileId) { public void shootTaskFinish(final String fileId) {
Logger.i(TAG,"shootTaskFinish : " + fileId);
handler.post(new Runnable() { handler.post(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -254,7 +257,7 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -254,7 +257,7 @@ public class ThetaCameraActivity extends ThetaActivity {
* @param mJpegInputStream Live画像データ * @param mJpegInputStream Live画像データ
*/ */
public void showLiveViewTaskFinish(MJpegInputStream mJpegInputStream) { public void showLiveViewTaskFinish(MJpegInputStream mJpegInputStream) {
Logger.i(TAG,"----- showLiveViewTaskFinish");
if (mJpegInputStream != null) { if (mJpegInputStream != null) {
mLiveView.setSource(mJpegInputStream); mLiveView.setSource(mJpegInputStream);
new GetOptionExposureTask(ThetaCameraActivity.this).execute(); new GetOptionExposureTask(ThetaCameraActivity.this).execute();
...@@ -311,6 +314,7 @@ public class ThetaCameraActivity extends ThetaActivity { ...@@ -311,6 +314,7 @@ public class ThetaCameraActivity extends ThetaActivity {
*/ */
@Override @Override
protected void thetaCameraWifiConnected() { protected void thetaCameraWifiConnected() {
Logger.i(TAG,"thetaCameraWifiConnected");
if (mLiveView.getSource() == null) { if (mLiveView.getSource() == null) {
if (mLivePreviewTask != null) { if (mLivePreviewTask != null) {
mLivePreviewTask.cancel(true); mLivePreviewTask.cancel(true);
......
...@@ -40,6 +40,7 @@ public class ThetaImageListActivity extends ThetaActivity { ...@@ -40,6 +40,7 @@ public class ThetaImageListActivity extends ThetaActivity {
private boolean isSelected = false; private boolean isSelected = false;
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
Logger.i(TAG, "--- onCreate");
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.ac_theta_image_list); setContentView(R.layout.ac_theta_image_list);
mImageListView = findViewById(R.id.lv_theta_image); mImageListView = findViewById(R.id.lv_theta_image);
......
...@@ -40,7 +40,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -40,7 +40,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
Logger.d(TAG, "onCreate"); Logger.i(TAG, "onCreate");
setContentView(R.layout.ac_theta_image_preview); setContentView(R.layout.ac_theta_image_preview);
isSavedSuccess = false; isSavedSuccess = false;
// 戻るボタン // 戻るボタン
...@@ -48,6 +48,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -48,6 +48,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
backBtn.setOnClickListener(new View.OnClickListener() { backBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG, "--- backBtn.onClick");
//転送後にTHETAライブラリ再描画のため //転送後にTHETAライブラリ再描画のため
if (isThetaListActivityBack && isSavedSuccess) { if (isThetaListActivityBack && isSavedSuccess) {
setResult(RESULT_OK); setResult(RESULT_OK);
...@@ -61,6 +62,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -61,6 +62,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
mSaveBtn.setOnClickListener(new View.OnClickListener() { mSaveBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Logger.i(TAG,"mSaveBtn.onClick");
buttonDoubleTapControl(mSaveBtn); buttonDoubleTapControl(mSaveBtn);
AlertDialogUtil.showAlertDialog(ThetaImagePreviewActivity.this, R.string.app_name, R.string.msg_theta_image_send_confirm, false, new DialogInterface.OnClickListener() { AlertDialogUtil.showAlertDialog(ThetaImagePreviewActivity.this, R.string.app_name, R.string.msg_theta_image_send_confirm, false, new DialogInterface.OnClickListener() {
@Override @Override
...@@ -70,9 +72,11 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -70,9 +72,11 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
@Override @Override
public void run() { public void run() {
if (mThetaHelper.thetaImageLocalSave(mTexture.getPhoto(), mFileId)) { if (mThetaHelper.thetaImageLocalSave(mTexture.getPhoto(), mFileId)) {
Logger.i(TAG,"画像転送に成功しました。");
showSimpleAlertDialog(R.string.app_name, R.string.msg_theta_image_send_success); showSimpleAlertDialog(R.string.app_name, R.string.msg_theta_image_send_success);
isSavedSuccess = true; isSavedSuccess = true;
} else { } else {
Logger.i(TAG,"画像転送に失敗しました。");
showSimpleAlertDialog(R.string.app_name, R.string.msg_theta_image_send_fail); showSimpleAlertDialog(R.string.app_name, R.string.msg_theta_image_send_fail);
} }
closeProgressPopup(); closeProgressPopup();
...@@ -98,7 +102,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -98,7 +102,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
//端末の戻るボタン禁止 //端末の戻るボタン禁止
@Override @Override
public boolean dispatchKeyEvent(KeyEvent event) { public boolean dispatchKeyEvent(KeyEvent event) {
Logger.v(TAG, "dispatchKeyEvent %s", event); Logger.i(TAG, "dispatchKeyEvent %s", event);
if (event.getAction()==KeyEvent.ACTION_UP) { // 戻るボタンを抑止 if (event.getAction()==KeyEvent.ACTION_UP) { // 戻るボタンを抑止
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) { if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
return true; return true;
...@@ -112,6 +116,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity { ...@@ -112,6 +116,7 @@ public class ThetaImagePreviewActivity extends ThetaActivity {
* @param imageData 画像データ * @param imageData 画像データ
*/ */
public void loadPhotoTaskFinish(ImageData imageData) { public void loadPhotoTaskFinish(ImageData imageData) {
Logger.i(TAG, "--- loadPhotoTaskFinish");
if (imageData != null) { if (imageData != null) {
byte[] dataObject = imageData.getRawData(); byte[] dataObject = imageData.getRawData();
if (dataObject == null) { if (dataObject == null) {
......
...@@ -24,12 +24,13 @@ public class DeviceInfoTask extends AsyncTask<Void, String, ThetaDeviceInfo> { ...@@ -24,12 +24,13 @@ public class DeviceInfoTask extends AsyncTask<Void, String, ThetaDeviceInfo> {
private static final int FAIL_RETRAY_DELAY_MILLIS = 2000; private static final int FAIL_RETRAY_DELAY_MILLIS = 2000;
public DeviceInfoTask(DeviceImageListActivity refActivity) { public DeviceInfoTask(DeviceImageListActivity refActivity) {
Logger.i(TAG,"--- DeviceInfoTask");
this.refActivity = new WeakReference<>(refActivity); this.refActivity = new WeakReference<>(refActivity);
} }
@Override @Override
protected ThetaDeviceInfo doInBackground(Void... params) { protected ThetaDeviceInfo doInBackground(Void... params) {
Logger.d(TAG, "doInBackground"); Logger.i(TAG, "--- doInBackground");
HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS); HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS);
final int MAX_RETRY_COUNT = 6; final int MAX_RETRY_COUNT = 6;
ThetaDeviceInfo deviceInfo = null; ThetaDeviceInfo deviceInfo = null;
...@@ -56,7 +57,7 @@ public class DeviceInfoTask extends AsyncTask<Void, String, ThetaDeviceInfo> { ...@@ -56,7 +57,7 @@ public class DeviceInfoTask extends AsyncTask<Void, String, ThetaDeviceInfo> {
@Override @Override
protected void onPostExecute(ThetaDeviceInfo deviceInfo) { protected void onPostExecute(ThetaDeviceInfo deviceInfo) {
Logger.d(TAG, "onPostExecute"); Logger.i(TAG, "--- onPostExecute");
DeviceImageListActivity activity = refActivity.get(); DeviceImageListActivity activity = refActivity.get();
activity.thetaDeviceInfoTaskFinish(deviceInfo); activity.thetaDeviceInfoTaskFinish(deviceInfo);
} }
......
...@@ -32,6 +32,7 @@ public class ImageListTask extends AsyncTask<Void, String, List<ImageRow>> { ...@@ -32,6 +32,7 @@ public class ImageListTask extends AsyncTask<Void, String, List<ImageRow>> {
private final WeakReference<ThetaImageListActivity> refActivity; private final WeakReference<ThetaImageListActivity> refActivity;
public ImageListTask(ThetaImageListActivity refActivity) { public ImageListTask(ThetaImageListActivity refActivity) {
Logger.i(TAG, "--- ImageListTask");
this.refActivity = new WeakReference<>(refActivity); this.refActivity = new WeakReference<>(refActivity);
} }
...@@ -43,7 +44,7 @@ public class ImageListTask extends AsyncTask<Void, String, List<ImageRow>> { ...@@ -43,7 +44,7 @@ public class ImageListTask extends AsyncTask<Void, String, List<ImageRow>> {
@Override @Override
protected List<ImageRow> doInBackground(Void... params) { protected List<ImageRow> doInBackground(Void... params) {
try { try {
Logger.d(TAG, "doInBackground"); Logger.i(TAG, "---- doInBackground");
boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false); boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false);
HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi); HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi);
ArrayList<ImageInfo> objects = camera.getList(); ArrayList<ImageInfo> objects = camera.getList();
......
...@@ -34,13 +34,14 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> { ...@@ -34,13 +34,14 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> {
private long receivedDataSize = 0; private long receivedDataSize = 0;
public LoadPhotoTask(Activity refActivity, String fileId) { public LoadPhotoTask(Activity refActivity, String fileId) {
Logger.i(TAG,"--- LoadPhotoTask");
this.refActivity = new WeakReference<>(refActivity); this.refActivity = new WeakReference<>(refActivity);
this.mFileId = fileId; this.mFileId = fileId;
} }
@Override @Override
protected void onPreExecute() { protected void onPreExecute() {
Logger.d(TAG, "onPreExecute"); Logger.i(TAG, "--- onPreExecute");
Activity activity = refActivity.get(); Activity activity = refActivity.get();
if (activity instanceof ThetaImagePreviewActivity) { if (activity instanceof ThetaImagePreviewActivity) {
ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity; ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity;
...@@ -52,17 +53,19 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> { ...@@ -52,17 +53,19 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> {
@Override @Override
protected ImageData doInBackground(Void... params) { protected ImageData doInBackground(Void... params) {
try { try {
Logger.d(TAG,"start to download image" + mFileId); Logger.i(TAG,"start to download image" + mFileId);
boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false); boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false);
HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi); HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi);
ImageData resizedImageData = camera.getImage(mFileId, new HttpDownloadListener() { ImageData resizedImageData = camera.getImage(mFileId, new HttpDownloadListener() {
@Override @Override
public void onTotalSize(long totalSize) { public void onTotalSize(long totalSize) {
Logger.i(TAG,"----onTotalSize : " + totalSize);
fileSize = totalSize; fileSize = totalSize;
} }
@Override @Override
public void onDataReceived(int size) { public void onDataReceived(int size) {
//Logger.i(TAG,"----onDataReceived : " + size);
receivedDataSize += size; receivedDataSize += size;
if (fileSize != 0) { if (fileSize != 0) {
...@@ -87,10 +90,12 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> { ...@@ -87,10 +90,12 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> {
ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity; ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity;
for (Object param : values) { for (Object param : values) {
if (param instanceof Integer) { if (param instanceof Integer) {
Logger.d(TAG, "onProgressUpdate progress = " + param); if ((Integer)((Integer) param).intValue()%10 == 0) {
Logger.i(TAG, "--- onProgressUpdate progress = " + param);
}
previewActivity.progressDialogHorizontal.setProgress((Integer) param); previewActivity.progressDialogHorizontal.setProgress((Integer) param);
} else if (param instanceof String) { } else if (param instanceof String) {
Logger.d(TAG, "onProgressUpdate param = " + param); Logger.i(TAG, "onProgressUpdate param = " + param);
} }
} }
} }
...@@ -98,7 +103,7 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> { ...@@ -98,7 +103,7 @@ public class LoadPhotoTask extends AsyncTask<Void, Object, ImageData> {
@Override @Override
protected void onPostExecute(ImageData imageData) { protected void onPostExecute(ImageData imageData) {
Logger.d(TAG, "onPostExecute"); Logger.i(TAG, "---- onPostExecute");
Activity activity = refActivity.get(); Activity activity = refActivity.get();
if (activity instanceof ThetaImagePreviewActivity) { if (activity instanceof ThetaImagePreviewActivity) {
ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity; ThetaImagePreviewActivity previewActivity = (ThetaImagePreviewActivity)activity;
......
...@@ -29,23 +29,30 @@ public class ShowLiveViewTask extends AsyncTask<Void, String, MJpegInputStream> ...@@ -29,23 +29,30 @@ public class ShowLiveViewTask extends AsyncTask<Void, String, MJpegInputStream>
private final WeakReference<ThetaCameraActivity> refActivity; private final WeakReference<ThetaCameraActivity> refActivity;
public ShowLiveViewTask(ThetaCameraActivity refActivity) { public ShowLiveViewTask(ThetaCameraActivity refActivity) {
Logger.i(TAG,"---- ShowLiveViewTask");
this.refActivity = new WeakReference<>(refActivity); this.refActivity = new WeakReference<>(refActivity);
} }
@Override @Override
protected MJpegInputStream doInBackground(Void... params) { protected MJpegInputStream doInBackground(Void... params) {
Logger.d(TAG, "doInBackground"); Logger.i(TAG, "--- doInBackground");
MJpegInputStream mjis = null; MJpegInputStream mjis = null;
final int MAX_RETRY_COUNT = 5; final int MAX_RETRY_COUNT = 5;
for (int retryCount = 0; retryCount < MAX_RETRY_COUNT; retryCount++) { for (int retryCount = 0; retryCount < MAX_RETRY_COUNT; retryCount++) {
Logger.i(TAG,"retryCount = " + retryCount);
try { try {
boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false); boolean isOldApi = PreferenceUtil.getUserPref(refActivity.get(), ABookKeys.THETA_OLD_VERSION_FLG, false);
//boolean isOldApi = false;
Logger.i(TAG,"1");
HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi); HttpConnector camera = new HttpConnector(ABookValues.THETA_IP_ADDRESS, isOldApi);
Logger.i(TAG,"2");
InputStream is = camera.getLivePreview(); InputStream is = camera.getLivePreview();
Logger.i(TAG,"3");
mjis = new MJpegInputStream(is); mjis = new MJpegInputStream(is);
Logger.i(TAG,"4");
//正常にライブ再生されるか確認 //正常にライブ再生されるか確認
mjis.readMJpegFrame(); mjis.readMJpegFrame();
Logger.i(TAG,"5");
retryCount = MAX_RETRY_COUNT; retryCount = MAX_RETRY_COUNT;
} catch (IOException e) { } catch (IOException e) {
Logger.e(TAG,"doInBackground fail e = " + e.toString()); Logger.e(TAG,"doInBackground fail e = " + e.toString());
......
...@@ -35,7 +35,7 @@ public class ActionZoomLayout extends RelativeLayout { ...@@ -35,7 +35,7 @@ public class ActionZoomLayout extends RelativeLayout {
@Override @Override
protected void dispatchDraw(Canvas canvas) { protected void dispatchDraw(Canvas canvas) {
canvas.save(Canvas.ALL_SAVE_FLAG); canvas.save();
canvas.concat(imgMatrix); canvas.concat(imgMatrix);
super.dispatchDraw(canvas); super.dispatchDraw(canvas);
canvas.restore(); canvas.restore();
......
...@@ -179,7 +179,7 @@ public class ZoomRelativeLayout extends RelativeLayout { ...@@ -179,7 +179,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
@Override @Override
protected void dispatchDraw(Canvas canvas) { protected void dispatchDraw(Canvas canvas) {
canvas.save(Canvas.ALL_SAVE_FLAG); canvas.save();
if (!isOperationPdf) { if (!isOperationPdf) {
canvas.concat(imgMatrix); canvas.concat(imgMatrix);
} }
......
...@@ -44,7 +44,7 @@ download_server_address=https://check.abookcloud.com/acms ...@@ -44,7 +44,7 @@ download_server_address=https://check.abookcloud.com/acms
#syncview server #syncview server
websocket_server_http_url=https://chatdev2.abook.bz/v1 websocket_server_http_url=https://chatdev2.abook.bz/v1
websocket_server_ws_url=wss://chatdev2.abook.bz/v1 websocket_server_ws_url=wss://chatdev2.abook.bz/v1
#WebSocket debug出力 #WebSocket debug出力
websocket_debug=false websocket_debug=false
#Payment Settings #Payment Settings
...@@ -54,38 +54,38 @@ google_public_key3=LShEIudH7Q7jLZERczfa0PknZCC5I3G0bTNa/EndTMLIR6/W3DLHToDk5L5Nk ...@@ -54,38 +54,38 @@ google_public_key3=LShEIudH7Q7jLZERczfa0PknZCC5I3G0bTNa/EndTMLIR6/W3DLHToDk5L5Nk
#Application Settings #Application Settings
app_name=ABook Check app_name=ABook Check
#true:スリープ禁止, false:スリープ許可 #true:スリープ禁止, false:スリープ許可
keep_screen=false keep_screen=false
scheme_url=jp.agentec.abook.check scheme_url=jp.agentec.abook.check
#true:自動バージョン確認を行わない false:CMSへ自動バージョン確認を行う #true:自動バージョン確認を行わない false:CMSへ自動バージョン確認を行う
store_version=false store_version=false
product_code=1 product_code=1
#コンテンツリソースをcacheフォルダに展開するかしないか #コンテンツリソースをcacheフォルダに展開するかしないか
use_cache=true use_cache=true
#コンテンツリソースをcacheフォルダに展開する数 #コンテンツリソースをcacheフォルダに展開する数
cache_size=0 cache_size=0
#コンテンツのHead暗号化するかしないか #コンテンツのHead暗号化するかしないか
content_protected=true content_protected=true
#use_cacheと同様にPDFサムネイルimageをファイル化するかしないか #use_cacheと同様にPDFサムネイルimageをファイル化するかしないか
pdf_thumbnail_output=true pdf_thumbnail_output=true
#use_cacheと同様にPDFページimageをファイル化するかしないか #use_cacheと同様にPDFページimageをファイル化するかしないか
pdf_image_output=true pdf_image_output=true
#自動新着更新間隔(分) -1のとき自動更新しない #自動新着更新間隔(分) -1のとき自動更新しない
content_refresh_interval=30 content_refresh_interval=30
#アプリ異常終了時会議室再入室アラート表示期限(分) #アプリ異常終了時会議室再入室アラート表示期限(分)
meeting_reenter_alert=1440 meeting_reenter_alert=1440
#これより小さい閲覧時間(秒)のページログは送信しない #これより小さい閲覧時間(秒)のページログは送信しない
min_page_log_second=3 min_page_log_second=3
#メニュー表示をサービスオプションに従う #メニュー表示をサービスオプションに従う
follow_service_option=true follow_service_option=true
#パスワード失敗時の回数チェックを行うか否か #パスワード失敗時の回数チェックを行うか否か
is_check_invalid_passward_limit=true is_check_invalid_passward_limit=true
#リピート再生のデフォルト値 #リピート再生のデフォルト値
repeat_default=true repeat_default=true
#Setting Info(設定画面のABookについての設定情報) #Setting Info(設定画面のABookについての設定情報)
version_name=1.2.362 version_name=1.2.362
release_date=2021/01/27 release_date=2021/01/27
copy_right=2016 AGENTEC Co.,Ltd. All rights reserved. copy_right=2016 AGENTEC Co.,Ltd. All rights reserved.
...@@ -95,10 +95,10 @@ contact_email=abook-appsupport@agentec.jp ...@@ -95,10 +95,10 @@ contact_email=abook-appsupport@agentec.jp
#Log Settings #Log Settings
log_level=0 log_level=0
default_log_name=abvje default_log_name=abvje
#エラーレポート/Exportログ送信方法 1:acms 2:平文メール(開発・テスト時のみ) 3:暗号化添付メール #エラーレポート/Exportログ送信方法 1:acms 2:平文メール(開発・テスト時のみ) 3:暗号化添付メール
error_report_flg=1 error_report_flg=1
error_report_email=abook-appsupport@agentec.jp error_report_email=abook-appsupport@agentec.jp
#アプリ専用ログ保存期間(日)(0はログ出力なし) #アプリ専用ログ保存期間(日)(0はログ出力なし)
app_log_retention=7 app_log_retention=7
hprof=false hprof=false
...@@ -107,26 +107,26 @@ repository_fqdn=s.abook.bz ...@@ -107,26 +107,26 @@ repository_fqdn=s.abook.bz
# abvFunctionOptions.xml # abvFunctionOptions.xml
#Login #Login
#0:認証なし, 1:ログインID、パスワード, 2:アカウント文字列、ログインID、パスワード, 3:サイトID、アカウント文字列、ログインID、パスワード4:サイトID、アカウント文字列 #0:認証なし, 1:ログインID、パスワード, 2:アカウント文字列、ログインID、パスワード, 3:サイトID、アカウント文字列、ログインID、パスワード4:サイトID、アカウント文字列
login_mode=2 login_mode=2
#login_modeが0、1の場合のアカウントパス #login_modeが0、1の場合のアカウントパス
account_path=agtcatalog account_path=agtcatalog
#GCM #GCM
push_message=1 push_message=1
#手動更新 #手動更新
#0:非表示 1:表示 1.3.1 #0:非表示 1:表示 1.3.1
check_app_update=1 check_app_update=1
#ユーザ切り替え時全社グループのコンテンツを削除しない #ユーザ切り替え時全社グループのコンテンツを削除しない
#0:全てのコンテンツ削除 1:全社のコンテンツ削除しない 1.5.3 #0:全てのコンテンツ削除 1:全社のコンテンツ削除しない 1.5.3
not_delete_all_contents=0 not_delete_all_contents=0
BLJAR_NAME=ABVJE_BL.jar BLJAR_NAME=ABVJE_BL.jar
#store用の場合、armv7,x86両方ビルド #store用の場合、armv7,x86両方ビルド
#storeではない場合、armv7のみビルド #storeではない場合、armv7のみビルド
isStoreProduct=false isStoreProduct=false
#1.2.302 Edition #1.2.302 Edition
......
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