From 87fbf5659ef0a0f1e704a6badeee1e05bc369ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Wed, 17 Jan 2024 20:05:49 +0900 Subject: [PATCH] =?UTF-8?q?onStop=E3=82=92=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=A2=E3=82=A6=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/childguard/MainActivity.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/example/childguard/MainActivity.java b/app/src/main/java/com/example/childguard/MainActivity.java index babe097..797253a 100644 --- a/app/src/main/java/com/example/childguard/MainActivity.java +++ b/app/src/main/java/com/example/childguard/MainActivity.java @@ -137,7 +137,7 @@ public class MainActivity extends AppCompatActivity { }); findViewById(R.id.fab_scan_qr_code).setOnClickListener(v -> { - Log.d("QRFragment", "onClick: called"); + Log.d("MainActivity/Fab", "onClick: called"); //QRリーダ起動 ScanOptions options = new ScanOptions(); options.setPrompt("QRコードを読み取ってください"); @@ -194,6 +194,7 @@ public class MainActivity extends AppCompatActivity { String parent = documentSnapshot.getString("parent"); Log.d("nt", "レスポンスを検知しました1"); + assert parent != null; if (parent.equals("s")) {//FireBaseの更新情報が"S"のとき=サイト上で第三者ボタンが押されたとき if (isInCar) { int importance = NotificationManager.IMPORTANCE_DEFAULT; @@ -288,14 +289,12 @@ public class MainActivity extends AppCompatActivity { } - @Override - public void onStop() { - super.onStop(); - Intent intent = new Intent(getApplication(), TestService.class); - startService(intent); - - - } +// @Override +// public void onStop() { +// super.onStop(); +// Intent intent = new Intent(getApplication(), TestService.class); +// startService(intent); +// } //Bluetooth_setupの戻るボタン public void setupBackButton(boolean enableBackButton) {