Not allowed to load local resource trying opening googlechrome://navigate?url=xxxx.com URI schema on Android with Javascript
Asked Answered
B

0

3

On Android devices I need to open a URL using google chrome regardless the browser where the url is clicked (in my case facebook in-app browser). To do so I created small proxy with a Javascript redirect using the chrome URI schema:

 window.location = "googlechrome://navigate?url=google.com";

I am testing this on two different devices, on the first one (ASUS X018D - Android 8.1) it works perfectly. On the second one (Samsung Galaxy S9 plus - Android 9) I get the error Not allowed to load local resource: googlechrome://navigate?url=google.com (I can see this inspecting the remote device with chrome). The URL I am using is not a local one so I don't understand why this error is triggered and how to solve it.

Byrnie answered 12/9, 2019 at 18:4 Comment(2)
Did you ever figure this out? If not, does this still happen if you put it in an anchor tag and manually click the link instead of triggering it with javascript?Apodictic
This may help: https://mcmap.net/q/671105/-href-value-in-html-to-open-url-in-chrome-appIonian

© 2022 - 2024 — McMap. All rights reserved.