From 3692e0cbd3d5473b2bda06eb0d8c36d5a4a29262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jul 2024 15:37:50 +0900 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/childguard/TestService.java | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/app/src/main/java/com/example/childguard/TestService.java b/app/src/main/java/com/example/childguard/TestService.java index 772ad36..f0b22dc 100644 --- a/app/src/main/java/com/example/childguard/TestService.java +++ b/app/src/main/java/com/example/childguard/TestService.java @@ -267,26 +267,7 @@ public class TestService extends Service { String action = intent.getAction(); // may need to chain this to a recognizing function boolean isInCar = pref.getBoolean("isInCarPref", false); - - if (BluetoothDevice.ACTION_ACL_CONNECTED.equals(action)) { - //Do something if connected - //Bluetoothデバイスが接続されたときの処理 - Log.d("BT", "Device connected"); - - - Log.d("BT_Judge", "Registered: " + registeredId); - - if (deviceHardwareAddress.equals(registeredId)) { - //登録済みのデバイスだったときの処理 - Log.d("BT_Judge", "登録済み"); - - } else { - //登録していないデバイスだったときの処理 - Log.d("BT_Judge", "未登録"); - } - e.apply(); - - } else if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action) && !isInCar) {//bluetoothが切断されたときに乗車状態のとき + if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action) && !isInCar) {//bluetoothが切断されたときに乗車状態のとき //Do something if disconnected //デバイスが切断されたときの処理