I am loading mobile site in a WebView. The Flash player does not stop when the back button is pressed. To resolve that, I have added following to my code:
try {
Class.forName("android.webkit.WebView").getMethod("onPause", (Class[]) null).invoke(wv, (Object[]) null);
} catch(Exception e) {
}
It has resolved the problem, but when I rotate the screen and press back button, it is still playing flash in back.
For Honeycomb+ targets, you can add calls to the WebView’s onPause() and onResume() in your activity’s onPause() and onResume():
// assuming mWebView is assigned in onCreate() ..