[英]Javascript - On android, how to close google chrome browser window?
On Android i have Google chrome browser window open from my Java app. 在Android上,我从Java应用程序中打开了Google chrome浏览器窗口。 On that page i have following javascript to close the browser window so that it can go back to my Java app.
在该页面上,我有以下javascript关闭浏览器窗口,以便它可以返回到我的Java应用程序。
function die() {
//window.close(); ------ FAIL
//window.history.back(); ------ FAIL
//open(location, '_self').close(); ------ FAIL
$('body').html('<h1>Session closed, i cant help you to close via JavaScript it sucks. Press the back button manually. Yes it stupid but thats the only way?</h1>');
return false;
}
But above window.close or other options are not working. 但是在window.close或其他选项之上不起作用。 How do i close the browser window in such case?
在这种情况下如何关闭浏览器窗口?
Update your app to launch a Chrome custom tab . 更新您的应用以启动Chrome自定义标签 。 When this single tab-in-a-window closes it will return to your application.
当该单个选项卡窗口关闭时,它将返回到您的应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.