android WebView stop running
-
I have the following problem with a WebView Control. My webview is defined in a Activity as follows: public class MyWebView extends Activity { private WebView webview; ... @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mywebview); ... webview = new WebView(getApplicationContext()); webview.setWebChromeClient(new WebChromeClient() { ... }); webview.setWebViewClient(new WebViewClient() { ... }); ... webview.loadUrl("http://www.google.de"); } Everything works fine, the Webpage is opened. But if close the Activity (Back-Button pressed) and go back to my main-menue, the WebView seems not to be closed. The http-threads keeps running. If I open about 10 several pages one after another, the Webpages are not nonger loadet, but "Webpage not available" is displayd in the WebView. What is wrong? How to close the WebView? webview.destroy(); webview = null; e.g. does not work. Thanx a lot for any suggestions!
-
Answer:
Try looking at this to see if it is the same issue and resolution. http://stackoverflow.com/questions/3431351/how-do-i-pause-flash-content-in-an-android-webview-when-my-activity-isnt-visible
S26 at Stack Overflow Visit the source
Other answers
Do this: In the onPause(), call webView.onPause(), and in onResume() call webView.onResume().
Seymour Cakes
Related Q & A:
- how to clear the running app in android?Best solution by Stack Overflow
- how to Kill running applications on Android?Best solution by Stack Overflow
- How can I call Android JavaScript functions in WebView?Best solution by Stack Overflow
- How to keep an Android Service running?Best solution by Stack Overflow
- How can I make my nose stop running?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.