Fix 1 #16

Merged
r-ca merged 4 commits from fix-1 into main 2024-01-17 11:07:45 +00:00
Showing only changes of commit 39ebdf0259 - Show all commits

View File

@ -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));
}
}
}
);