WebView also Gone when Sreen Time-Out
<p>I would like to find a solution to allow my WebView still alive when screen time-out.</p>

<p>I am program to play music using WebView, it's working very properly if the screen alive but when the screen time-out my music in WebView also GONE.</p>

<h1>Here is my code:</h1>

<pre><code>public class WebViewActivity extends Activity {

WebView mWebView;
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.playlist);

    mWebView = (WebView) findViewById(R.id.webView1);
    mWebView.setWebViewClient(new HelloWebViewClient());
    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.getSettings().setPluginsEnabled(true);
    mWebView.getSettings().setAllowFileAccess(true);
    mWebView.loadUrl("http://mp3skull.com/usher.html");
}
private class HelloWebViewClient extends WebViewClient {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; mWebView.canGoBack()) {
        mWebView.goBack();
        return true;
    }
    return super.onKeyDown(keyCode, event);
}
@Override
public void onPause()
{
    mWebView.setVisibility(View.GONE);
    mWebView.destroy();
    super.onPause();
}
 }
</code></pre>

<p>I am very shy to tell you that i tried to find this solution over a week but still can't done :(.</p>

<p>Hope you give me solution on this matter.</p>

<p>Thanks you.</p>
