How do I stop Flash after leaving a WebView?

后端 未结 6 1801
忘掉有多难
忘掉有多难 2020-12-30 08:11

I have an app that I\'ve put together to stream flash video in a webview when a user clicks a button.

It does this fine, but after backing out or losing focus, it lo

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 08:49

    I combined some of the answers here, and this worked for me:

    @Override
    protected void onDestroy()
    {
        super.onDestroy();
    
        webView.stopLoading();
        webView.loadData("", "text/html", "utf-8");
        webView.destroy();
    }
    

提交回复
热议问题