简体   繁体   中英

Refresh Android webview after closing external page

Im using Android webview to load a website. And for some reasons I wanted to show some external URL off the webview. That is, when user click on a link ( link is in the webview ) a new page will open in the default web browser. This part is working.

Now I wanted to refresh the webview after user close this external page running outside webview.

This can be done, If we running both pages ( parent and external page ) running in browser. Following code is working for this scenario

    $('#closeButton').click(function () {
        window.opener.location.reload();
        window.close();
    }); 

Above "window.opener.location.reload()" is not reloading Android webview.

Is there are any solution for this ?

You may know but the only solution is : mWebView.reload(); for android

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM