条件式を変更

This commit is contained in:
r-ca committed 2024-01-17 19:55:30 +09:00
1 parent 23be550762
commit 39ebdf0259
1 file changed
+3 -1
@@ -86,7 +86,8 @@ public class MainActivity extends AppCompatActivity {
String contents = result.getContents(); String contents = result.getContents();
if (contents == null) { if (contents == null) {
Toast.makeText(this, "QRコードが読み取れませんでした", Toast.LENGTH_LONG).show(); Toast.makeText(this, "QRコードが読み取れませんでした", Toast.LENGTH_LONG).show();
} else if (!contents.contains("https://practicefirestore1-8808c.web.app/")) { } else {
if (!contents.contains("https://practicefirestore1-8808c.web.app/")) {
Toast.makeText(this, "Chiled Guardに対応するQRコードではありません", Toast.LENGTH_LONG).show(); Toast.makeText(this, "Chiled Guardに対応するQRコードではありません", Toast.LENGTH_LONG).show();
} else { } else {
//URLの表示 //URLの表示
@@ -97,6 +98,7 @@ public class MainActivity extends AppCompatActivity {
customTabsIntent.launchUrl(this, Uri.parse(contents)); customTabsIntent.launchUrl(this, Uri.parse(contents));
} }
} }
}
); );
@Override @Override