OSDN Git Service

BLE接続を行うための準備を追加。
authorMRSa <mrsa@myad.jp>
Thu, 14 Dec 2017 15:22:00 +0000 (00:22 +0900)
committerMRSa <mrsa@myad.jp>
Thu, 14 Dec 2017 15:22:00 +0000 (00:22 +0900)
12 files changed:
app/build.gradle
app/src/main/AndroidManifest.xml
app/src/main/java/net/osdn/gokigen/a01d/A01dMain.java
app/src/main/java/net/osdn/gokigen/a01d/camera/olympus/wrapper/connection/ble/PowerOnCamera.java [new file with mode: 0644]
app/src/main/java/net/osdn/gokigen/a01d/preference/IPreferencePropertyAccessor.java
app/src/main/java/net/osdn/gokigen/a01d/preference/PreferenceFragment.java
app/src/main/res/layout-land/fragment_live_view.xml
app/src/main/res/layout/fragment_live_view.xml
app/src/main/res/values-ja/strings.xml
app/src/main/res/values/strings.xml
app/src/main/res/xml/preferences.xml
build.gradle

index f0933a5..5593f89 100644 (file)
@@ -7,8 +7,8 @@ android {
         applicationId "net.osdn.gokigen.a01d"
         minSdkVersion 14
         targetSdkVersion 27
-        versionCode 10003
-        versionName "1.0.3"
+        versionCode 10004
+        versionName "1.0.4"
     }
     buildTypes {
         release {
@@ -20,11 +20,10 @@ android {
 
 dependencies {
     compile fileTree(dir: 'libs', include: ['*.jar'])
-    compile 'com.android.support:appcompat-v7:27.0.0'
+    compile 'com.android.support:appcompat-v7:27.0.2'
     compile 'com.android.support.constraint:constraint-layout:1.0.2'
-    compile 'com.android.support:preference-v14:27.0.0'
-    //provided 'com.google.android.things:androidthings:0.4.1-devpreview'
-    compile 'com.android.support:preference-v7:27.0.0'
-    compile 'com.android.support:exifinterface:27.0.0'
+    compile 'com.android.support:preference-v14:27.0.2'
+    compile 'com.android.support:preference-v7:27.0.2'
+    compile 'com.android.support:exifinterface:27.0.2'
     compile files('libs/olycamerakit.jar')
 }
index 57238ea..6423821 100644 (file)
@@ -6,6 +6,9 @@
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.BLUETOOTH" />
+    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
 
     <application
         android:allowBackup="true"
index 1363607..9671ffe 100644 (file)
@@ -3,6 +3,7 @@ package net.osdn.gokigen.a01d;
 import android.Manifest;
 import android.content.SharedPreferences;
 import android.content.pm.PackageManager;
+import android.support.annotation.NonNull;
 import android.support.v4.app.ActivityCompat;
 import android.support.v4.app.FragmentTransaction;
 import android.support.v4.content.ContextCompat;
@@ -19,6 +20,7 @@ import net.osdn.gokigen.a01d.camera.olympus.cameraproperty.OlyCameraPropertyList
 import net.osdn.gokigen.a01d.camera.olympus.wrapper.OlympusInterfaceProvider;
 import net.osdn.gokigen.a01d.camera.olympus.wrapper.connection.ICameraStatusReceiver;
 import net.osdn.gokigen.a01d.camera.olympus.wrapper.connection.IOlyCameraConnection;
+import net.osdn.gokigen.a01d.camera.olympus.wrapper.connection.ble.PowerOnCamera;
 import net.osdn.gokigen.a01d.liveview.IStatusViewDrawer;
 import net.osdn.gokigen.a01d.liveview.LiveViewFragment;
 import net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor;
@@ -28,7 +30,7 @@ import net.osdn.gokigen.a01d.preference.PreferenceFragment;
  *   A01d ;
  *
  */
-public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver, IChangeScene
+public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver, IChangeScene, PowerOnCamera.PowerOnCameraCallback
 {
     private final String TAG = toString();
     private IOlympusInterfaceProvider interfaceProvider = null;
@@ -73,12 +75,18 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
         if ((ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) ||
                 (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_NETWORK_STATE) != PackageManager.PERMISSION_GRANTED) ||
                 (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_WIFI_STATE) != PackageManager.PERMISSION_GRANTED) ||
+                (ContextCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH) != PackageManager.PERMISSION_GRANTED) ||
+                (ContextCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH_ADMIN) != PackageManager.PERMISSION_GRANTED) ||
+                (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) ||
                 (ContextCompat.checkSelfPermission(this, Manifest.permission.INTERNET) != PackageManager.PERMISSION_GRANTED)) {
             ActivityCompat.requestPermissions(this,
                     new String[]{
                             Manifest.permission.WRITE_EXTERNAL_STORAGE,
                             Manifest.permission.ACCESS_NETWORK_STATE,
                             Manifest.permission.ACCESS_WIFI_STATE,
+                            Manifest.permission.BLUETOOTH,
+                            Manifest.permission.BLUETOOTH_ADMIN,
+                            Manifest.permission.ACCESS_COARSE_LOCATION,
                             Manifest.permission.INTERNET,
                     },
                     REQUEST_NEED_PERMISSIONS);
@@ -93,7 +101,7 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
      *
      */
     @Override
-    public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults)
+    public void onRequestPermissionsResult(int requestCode, @NonNull String  permissions[], @NonNull int[] grantResults)
     {
         super.onRequestPermissionsResult(requestCode, permissions, grantResults);
         onReadyClass();
@@ -109,7 +117,8 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
             OlympusInterfaceProvider provider = new OlympusInterfaceProvider(this, this);
             interfaceProvider = provider;
             interfaceInjector = provider;
-        } catch (Exception e)
+        }
+        catch (Exception e)
         {
             e.printStackTrace();
         }
@@ -120,9 +129,23 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
      */
     private void onReadyClass()
     {
-        // 自動接続の指示があったとき
-        if (isAutoConnectCamera())
+        if (isBlePowerOn())
         {
+            // BLEでカメラの電源をONにする設定だった時
+            try
+            {
+                // カメラの電源ONクラスを呼び出しておく
+                PowerOnCamera powerOnCamera = new PowerOnCamera(this);
+                powerOnCamera.wakeup();
+            }
+            catch (Exception e)
+            {
+                e.printStackTrace();
+            }
+        }
+        else if (isAutoConnectCamera())
+        {
+            // 自動接続の指示があったとき
             changeCameraConnection();
         }
     }
@@ -145,14 +168,19 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
      *
      */
     @Override
-    protected void onPause() {
+    protected void onPause()
+    {
         super.onPause();
-        try {
+        try
+        {
             IOlyCameraConnection connection = interfaceProvider.getOlyCameraConnection();
-            if (connection != null) {
+            if (connection != null)
+            {
                 connection.stopWatchWifiStatus(this);
             }
-        } catch (Exception e) {
+        }
+        catch (Exception e)
+        {
             e.printStackTrace();
         }
     }
@@ -165,10 +193,13 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
     public void changeSceneToCameraPropertyList()
     {
         IOlyCameraConnection connection = interfaceProvider.getOlyCameraConnection();
-        if (connection != null) {
+        if (connection != null)
+        {
             IOlyCameraConnection.CameraConnectionStatus status = connection.getConnectionStatus();
-            if (status == IOlyCameraConnection.CameraConnectionStatus.CONNECTED) {
-                if (propertyListFragment == null) {
+            if (status == IOlyCameraConnection.CameraConnectionStatus.CONNECTED)
+            {
+                if (propertyListFragment == null)
+                {
                     propertyListFragment = new OlyCameraPropertyListFragment();
                 }
                 propertyListFragment.setInterface(this, interfaceProvider.getCameraPropertyProvider());
@@ -182,7 +213,8 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
     }
 
     /**
-     * 設定画面を開く
+     *   設定画面を開く
+     *
      */
     @Override
     public void changeSceneToConfiguration()
@@ -200,7 +232,7 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
     }
 
     /**
-     * カメラとの接続・切断のシーケンス
+     *   カメラとの接続・切断のシーケンス
      */
     @Override
     public void changeCameraConnection()
@@ -212,7 +244,8 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
         }
 
         IOlyCameraConnection connection = interfaceProvider.getOlyCameraConnection();
-        if (connection != null) {
+        if (connection != null)
+        {
             IOlyCameraConnection.CameraConnectionStatus status = connection.getConnectionStatus();
             if (status == IOlyCameraConnection.CameraConnectionStatus.CONNECTED)
             {
@@ -229,15 +262,20 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
      * アプリを抜ける
      */
     @Override
-    public void exitApplication() {
+    public void exitApplication()
+    {
         Log.v(TAG, "exitApplication()");
-        try {
+        try
+        {
             IOlyCameraConnection connection = interfaceProvider.getOlyCameraConnection();
-            if (connection != null) {
+            if (connection != null)
+            {
                 connection.disconnect(true);
             }
             finish();
-        } catch (Exception e) {
+        }
+        catch (Exception e)
+        {
             e.printStackTrace();
         }
     }
@@ -247,18 +285,20 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
      *
      */
     @Override
-    public void onStatusNotify(String message) {
+    public void onStatusNotify(String message)
+    {
         Log.v(TAG, " CONNECTION MESSAGE : " + message);
-        if (statusViewDrawer != null) {
+        if (statusViewDrawer != null)
+        {
             statusViewDrawer.updateStatusView(message);
             IOlyCameraConnection connection = interfaceProvider.getOlyCameraConnection();
-            if (connection != null) {
+            if (connection != null)
+            {
                 statusViewDrawer.updateConnectionStatus(connection.getConnectionStatus());
             }
         }
     }
 
-
     /**
      *
      *
@@ -328,6 +368,30 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
         }
     }
 
+    /**
+     *   BLE経由でカメラの電源を入れるかどうか
+     *
+     */
+    private boolean isBlePowerOn()
+    {
+        boolean ret = false;
+        try
+        {
+            SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
+            ret = preferences.getBoolean(IPreferencePropertyAccessor.BLE_POWER_ON, false);
+            // Log.v(TAG, "isBlePowerOn() : " + ret);
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+        return (ret);
+    }
+
+    /**
+     *    カメラへの自動接続を行うかどうか
+     *
+     */
     private boolean isAutoConnectCamera()
     {
         boolean ret = true;
@@ -343,4 +407,20 @@ public class A01dMain extends AppCompatActivity implements ICameraStatusReceiver
         }
         return (ret);
     }
+
+    /**
+     *   カメラへのBLE接続指示が完了したとき
+     *
+     * @param isExecuted  true : BLEで起動した, false : 起動していない、その他
+     */
+    @Override
+    public void wakeupExecuted(boolean isExecuted)
+    {
+        Log.v(TAG, "wakeupExecuted() : " + isExecuted);
+        if ((isExecuted)&&(isAutoConnectCamera()))
+        {
+            // カメラへ自動接続する設定だった場合、カメラへWiFi接続する
+            changeCameraConnection();
+        }
+    }
 }
diff --git a/app/src/main/java/net/osdn/gokigen/a01d/camera/olympus/wrapper/connection/ble/PowerOnCamera.java b/app/src/main/java/net/osdn/gokigen/a01d/camera/olympus/wrapper/connection/ble/PowerOnCamera.java
new file mode 100644 (file)
index 0000000..f83a7f2
--- /dev/null
@@ -0,0 +1,40 @@
+package net.osdn.gokigen.a01d.camera.olympus.wrapper.connection.ble;
+
+
+import android.util.Log;
+
+/**
+ *   BLE経由でカメラの電源を入れるクラス
+ *
+ */
+public class PowerOnCamera
+{
+    private final String TAG = toString();
+    private final PowerOnCameraCallback callback;
+
+    public PowerOnCamera(PowerOnCameraCallback callback)
+    {
+        Log.v(TAG, "PowerOnCamera()");
+
+        this.callback = callback;
+    }
+
+    public void wakeup()
+    {
+        Log.v(TAG, "PowerOnCamera::wakeup()");
+
+
+        // 今は暫定で返しちゃう
+        callback.wakeupExecuted(true);
+    }
+
+    /**
+     *   実行終了時のコールバックのインタフェース
+     *
+     */
+    public interface PowerOnCameraCallback
+    {
+        void wakeupExecuted(boolean isExecute);
+    }
+
+}
index 1f6cd2c..b01080d 100644 (file)
@@ -10,6 +10,7 @@ public interface IPreferencePropertyAccessor
     String EXIT_APPLICATION = "exit_application";
 
     String AUTO_CONNECT_TO_CAMERA = "auto_connect_to_camera";
+    String BLE_POWER_ON = "ble_power_on";
 
     String TAKE_MODE =  "take_mode";
     String TAKE_MODE_DEFAULT_VALUE =  "P";
@@ -37,8 +38,7 @@ public interface IPreferencePropertyAccessor
 
     String CAPTURE_BOTH_CAMERA_AND_LIVE_VIEW = "capture_both_camera_and_live_view";
 
-
-/*****
+/*
     int CHOICE_SPLASH_SCREEN = 10;
 
     int SELECT_SAMPLE_IMAGE_CODE = 110;
index 1db5f5d..9f44628 100644 (file)
@@ -104,6 +104,10 @@ public class PreferenceFragment extends PreferenceFragmentCompat implements Shar
         {
             editor.putBoolean(net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.RAW, true);
         }
+        if (!items.containsKey(IPreferencePropertyAccessor.BLE_POWER_ON))
+        {
+            editor.putBoolean(net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.BLE_POWER_ON, false);
+        }
         if (!items.containsKey(net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.AUTO_CONNECT_TO_CAMERA))
         {
             editor.putBoolean(net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.AUTO_CONNECT_TO_CAMERA, true);
@@ -341,6 +345,11 @@ public class PreferenceFragment extends PreferenceFragmentCompat implements Shar
                     setCameraProperty(IOlyCameraProperty.RAW, propertyValue);
                     break;
 
+                case IPreferencePropertyAccessor.BLE_POWER_ON:
+                    value = preferences.getBoolean(key, false);
+                    Log.v(TAG, " " + key + " , " + value);
+                    break;
+
                 case IPreferencePropertyAccessor.AUTO_CONNECT_TO_CAMERA:
                     value = preferences.getBoolean(key, true);
                     Log.v(TAG, " " + key + " , " + value);
@@ -456,6 +465,8 @@ public class PreferenceFragment extends PreferenceFragmentCompat implements Shar
                     setListPreference(IPreferencePropertyAccessor.TAKE_MODE, IPreferencePropertyAccessor.TAKE_MODE, net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.TAKE_MODE_DEFAULT_VALUE);
                     setListPreference(IPreferencePropertyAccessor.SOUND_VOLUME_LEVEL, IPreferencePropertyAccessor.SOUND_VOLUME_LEVEL, net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor.SOUND_VOLUME_LEVEL_DEFAULT_VALUE);
                     setBooleanPreference(IPreferencePropertyAccessor.RAW, IPreferencePropertyAccessor.RAW, true);
+                    setBooleanPreference(IPreferencePropertyAccessor.BLE_POWER_ON, IPreferencePropertyAccessor.BLE_POWER_ON, false);
+                    setBooleanPreference(IPreferencePropertyAccessor.AUTO_CONNECT_TO_CAMERA, IPreferencePropertyAccessor.AUTO_CONNECT_TO_CAMERA, true);
 
                     // カメラキットのバージョン
                     findPreference(IPreferencePropertyAccessor.CAMERAKIT_VERSION).setSummary(OLYCamera.getVersion());
index 428d062..e3adab6 100644 (file)
@@ -24,6 +24,7 @@
             android:layout_height="fill_parent"
             android:layout_weight="1"
             android:clickable="true"
+            android:focusable="true"
             android:contentDescription="@string/favorite"
             android:gravity="center"
             android:scaleType="fitCenter"
@@ -55,6 +56,7 @@
                 android:layout_alignParentEnd="true"
                 android:layout_alignParentBottom="true"
                 android:clickable="true"
+                android:focusable="true"
                 android:contentDescription="@string/button"
                 android:layout_marginBottom="2pt"
                 android:gravity="center"
@@ -68,6 +70,7 @@
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
                 android:clickable="true"
+                android:focusable="true"
                 android:contentDescription="@string/button"
                 android:gravity="center"
                 android:scaleType="fitCenter"
@@ -79,6 +82,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:clickable="true"
+                android:focusable="true"
                 android:layout_above="@id/focusing_button"
                 android:layout_alignLeft="@id/focusing_button"
                 android:layout_alignStart="@id/focusing_button"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignParentRight="true"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignParentLeft="true"
             android:layout_toRightOf="@id/connect_disconnect_button"
             android:layout_toEndOf="@id/connect_disconnect_button"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="start|center"
             android:text="@string/information"
             android:textColor="@color/background_translucent_dark"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignTop="@id/show_preference_button"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignTop="@id/show_preference_button"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignTop="@id/show_preference_button"
index f02c170..1c41d48 100644 (file)
@@ -33,6 +33,7 @@
             android:layout_width="fill_parent"
             android:layout_height="fill_parent"
             android:clickable="true"
+            android:focusable="true"
             android:contentDescription="@string/favorite"
             android:gravity="center"
             android:scaleType="fitCenter"
@@ -51,6 +52,7 @@
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitEnd"
             android:contentDescription="@string/button"
@@ -68,6 +70,7 @@
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:contentDescription="@string/button"
@@ -86,6 +89,7 @@
             android:layout_alignParentRight="true"
             android:layout_alignParentEnd="true"
             android:clickable="true"
+            android:focusable="true"
             android:text="@string/live_view_scale_default"
             android:contentDescription="@string/button"
             android:visibility="visible"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignParentRight="true"
             android:src="@drawable/ic_settings_black_24dp"
             android:visibility="visible" />
 
-
-
         <ImageButton
             android:id="@+id/connect_disconnect_button"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignParentLeft="true"
             android:layout_toRightOf="@id/connect_disconnect_button"
             android:layout_toEndOf="@id/connect_disconnect_button"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="start|center"
             android:text="@string/information"
             android:textColor="@color/background_translucent_dark"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignTop="@id/show_preference_button"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignTop="@id/show_preference_button"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:clickable="true"
+            android:focusable="true"
             android:gravity="center"
             android:scaleType="fitCenter"
             android:layout_alignTop="@id/show_preference_button"
index d1e4f3f..6f81d9d 100644 (file)
@@ -30,6 +30,8 @@
     <string name="pref_auto_connect_camera">カメラに自動接続</string>
     <string name="pref_summary_auto_connect_camera">通常、チェックを入れたままご使用ください</string>
     <string name="dialog_message_power_off">カメラの電源を切り、アプリケーションを終了します。</string>
+    <string name="pref_bluetooth_power_on">BLEでカメラ電源ON</string>
+    <string name="pref_summary_bluetooth_power_on">起動時、BLEでカメラをONにします。</string>
 
     <string name="pref_cat_live_view">ライブビュー設定</string>
     <string name="pref_live_view_quality">ライブビュー品質</string>
@@ -44,7 +46,7 @@
     <string name="pref_camera_version">Camera Version</string>
     <string name="pref_camerakit_version">Camera kit Version</string>
 
-    <string name="pref_cat_gokigen">GOKIGEN Project(現在、直接開けません)</string>
+    <string name="pref_cat_gokigen">GOKIGEN Project</string>
     <string name="pref_instruction_manual">操作説明</string>
     <string name="pref_privacy_policy">プライバシーポリシー</string>
 
index c14a302..109ecc6 100644 (file)
@@ -32,6 +32,8 @@
     <string name="pref_auto_connect_camera">Auto Connect To Camera</string>
     <string name="pref_summary_auto_connect_camera">Normally to keep ON.</string>
     <string name="dialog_message_power_off">Power Off</string>
+    <string name="pref_bluetooth_power_on">BLE Power On</string>
+    <string name="pref_summary_bluetooth_power_on">Camera Power on via BLE</string>
 
     <string name="pref_cat_live_view">Live View Settings</string>
     <string name="pref_live_view_quality">Live View Quality</string>
@@ -46,7 +48,7 @@
     <string name="pref_camera_version">Camera Version</string>
     <string name="pref_camerakit_version">Camera kit Version</string>
 
-    <string name="pref_cat_gokigen">GOKIGEN(Currently not open directly)</string>
+    <string name="pref_cat_gokigen">GOKIGEN</string>
     <string name="pref_instruction_manual">A01d Instructions</string>
     <string name="pref_privacy_policy">Privacy Policy</string>
 
index 31108c8..34fe48b 100644 (file)
         android:title="@string/pref_cat_initialize">
 
         <CheckBoxPreference
-            android:key="auto_connect_to_camera"
-            android:title="@string/pref_auto_connect_camera"
-            android:summary="@string/pref_summary_auto_connect_camera" />
+        android:key="auto_connect_to_camera"
+        android:title="@string/pref_auto_connect_camera"
+        android:summary="@string/pref_summary_auto_connect_camera" />
+
+        <CheckBoxPreference
+            android:key="ble_power_on"
+            android:title="@string/pref_bluetooth_power_on"
+            android:summary="@string/pref_summary_bluetooth_power_on" />
+
     </PreferenceCategory>
 
     <PreferenceCategory
index 16f40d2..ec0294e 100644 (file)
@@ -5,7 +5,7 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.0.0'
+        classpath 'com.android.tools.build:gradle:3.0.1'
 
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files