Skip to content

Commit 7553ede

Browse files
authored
fix(android): open external links in browser (#5913)
1 parent b8b9b1f commit 7553ede

File tree

1 file changed

+1
-1
lines changed
  • android/capacitor/src/main/java/com/getcapacitor

1 file changed

+1
-1
lines changed

android/capacitor/src/main/java/com/getcapacitor/Bridge.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public boolean launchIntent(Uri url) {
351351
}
352352
}
353353

354-
if (!url.toString().contains(appUrl) && !appAllowNavigationMask.matches(url.getHost())) {
354+
if (!url.toString().startsWith(appUrl) && !appAllowNavigationMask.matches(url.getHost())) {
355355
try {
356356
Intent openIntent = new Intent(Intent.ACTION_VIEW, url);
357357
getContext().startActivity(openIntent);

0 commit comments

Comments
 (0)