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

独自空忆成欢 提交于 2021-01-29 03:15:28

问题


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.

来源:https://stackoverflow.com/questions/57912296/not-allowed-to-load-local-resource-trying-opening-googlechrome-navigateurl-xx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!