Android WebView stop onPause Flash Plugin

I have a WebView that contains an html file containing a Flash plugin (video).

When the user presses the play button on the Flash plugin, the video plays normally.

However, when the user closes the application or moves to a new action, Flash is still playing in the background. Returning to the view, a new thread is created with the Flash plugin running on it.

How can we stop the Flash plugin running onPause?

thank

+3
android flash onpause
Apr 23 2018-11-11T00:
source share
2 answers

I ran into the same problem. The following worked for me:

@Override protected void onDestroy() { super.onDestroy(); final WebView webview = (WebView)findViewById(R.id.webPlayer); // Calling .clearView does not stop the flash player must load new data webview.loadData("", "text/html", "utf-8"); } 
+3
Sep 08 2018-11-11T00:
source share

try it.

  public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && webview.canGoBack()) { webview.goBack(); return true; } if (keyCode == KeyEvent.KEYCODE_BACK) { //webview=null; webview.reload(); } return super.onKeyDown(keyCode, event); } 

Pavan

-one
Apr 30 '11 at 2:23
source share



All Articles