From 39ebdf0259494c3b50a5328ca07dea2a706ce25e 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 19:55:30 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=BC=8F=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/childguard/MainActivity.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/example/childguard/MainActivity.java b/app/src/main/java/com/example/childguard/MainActivity.java index e419c10..babe097 100644 --- a/app/src/main/java/com/example/childguard/MainActivity.java +++ b/app/src/main/java/com/example/childguard/MainActivity.java @@ -86,15 +86,17 @@ public class MainActivity extends AppCompatActivity { String contents = result.getContents(); if (contents == null) { Toast.makeText(this, "QRコードが読み取れませんでした", Toast.LENGTH_LONG).show(); - } else if (!contents.contains("https://practicefirestore1-8808c.web.app/")) { - Toast.makeText(this, "Chiled Guardに対応するQRコードではありません", Toast.LENGTH_LONG).show(); } else { - //URLの表示 - Toast.makeText(this, contents, Toast.LENGTH_SHORT).show(); - //ブラウザを起動し、URL先のサイトを開く - CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); - CustomTabsIntent customTabsIntent = builder.build(); - customTabsIntent.launchUrl(this, Uri.parse(contents)); + if (!contents.contains("https://practicefirestore1-8808c.web.app/")) { + Toast.makeText(this, "Chiled Guardに対応するQRコードではありません", Toast.LENGTH_LONG).show(); + } else { + //URLの表示 + Toast.makeText(this, contents, Toast.LENGTH_SHORT).show(); + //ブラウザを起動し、URL先のサイトを開く + CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); + CustomTabsIntent customTabsIntent = builder.build(); + customTabsIntent.launchUrl(this, Uri.parse(contents)); + } } } );