On a specific subset of Android devices on Chrome stable version 110, when trying to open a generic UPI intent "upi://..."
, Chrome blocks navigation and prints a "Navigation is blocked" error on console. The expected behaviour is that an intent tray of UPI apps show up, or directly opens the user's default UPI app.
I'm using a simple anchor tag with the intent on which the user clicks:
<a href="upi://....">Pay with any UPI app</a>
As per the Chrome behaviour on Android, this is very similar behaviour to what happens in case of programmatic (non user-initiated) redirects to intents. As per the Chrome docs there are only two cases in which Chrome will block navigation -
My issue falls into none of these categories. Is there any other scenario in which Chrome can block such redirection on Android? Can user/browser settings or permissions affect this issue? (Is there a workaround even with the user following recommended settings)
Notes:
market://
I've tried all possible solutions I could find so far, but nothing seems to work. Here are a list of things I tried: (In order of higher optimism that it would fix the issue):
"upi://..."
to the native Android intent format like so: "intent://#Intent;scheme=upi;...end;"
as per best practices discussed in this blog and it seems this fix worked for some.rel="noopener"
or rel="noreferrer"
to the <a>
tag. This seems to be another resolution for similar issues.<button>
instead of an <a>
tag. Even with buttons, I tried different methods of redirection like window.open()
or setting document.location.href
or window.location.href
.None of these work, please let me know if I could try anything else to get this thing working.
Update: So the underlying issue was Chrome on Android blocking intents that targeted non-exported activities (since version 99). So even if any UPI app installed on the user's phone had a non-exported intent filter for the "upi" scheme, it would block normal behaviour of "upi" deeplinks. This has been fixed in latest Chrome Canary release, and is due to be released with the next Chrome stable release on Android (version 112) following this chromium bug.