admin管理员组文章数量:1410737
I am having a website in which i am using api's like push notification ,but when anyone open via Facebook or Twitter they tend to load an Android webview in which push notification api's are not there, the hack which i found is that if i can open chrome from webview in this way my push notification would work
it had tried
window.open("googlechrome://navigate?url=" + location.href, "_system")
but this gives error as Not allowed to load local resource:
need help from you all
I am having a website in which i am using api's like push notification ,but when anyone open via Facebook or Twitter they tend to load an Android webview in which push notification api's are not there, the hack which i found is that if i can open chrome from webview in this way my push notification would work
it had tried
window.open("googlechrome://navigate?url=" + location.href, "_system")
but this gives error as Not allowed to load local resource:
need help from you all
Share Improve this question edited May 19, 2020 at 10:34 Pranay Dutta asked May 18, 2020 at 11:49 Pranay DuttaPranay Dutta 2,5892 gold badges33 silver badges46 bronze badges 4- did you tried this way? window.open("googlechrome://navigate?url=" + location.href,'_system','location=yes'); – Shoma Commented May 19, 2020 at 3:09
- @Shoma,tried ,same error – Pranay Dutta Commented May 19, 2020 at 8:44
- what do you store in "location.href"? – Shoma Commented May 19, 2020 at 9:34
- It gives u the current url – Pranay Dutta Commented May 19, 2020 at 9:40
1 Answer
Reset to default 6As posted over here use the below code
window.location = 'intent:https://example.#Intent;end';
本文标签: How to open google chrome from webview via javascriptStack Overflow
版权声明:本文标题:How to open google chrome from webview via javascript? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745038383a2638927.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论