Close the sound, there is no good way, you can refer to the network of Practical Webview.reload ();
@Overrideprotected void Onresume () {//TODO auto-generated method Stubmwebview.onresume (); if (CommonDialog! = null) {Comm Ondialog.dismiss ();} Super.onresume ();} @Overrideprotected void OnPause () {//TODO auto-generated method stubif (Islandport) {if (chromeclient! = null) {CHROMECLI Ent.onhidecustomview ();}} Mwebview.reload (); Mwebview.onpause (); Super.onpause ();}
At the same time, must cooperate with WebView's OnDestroy method, otherwise, After Webview.reload, will continue to load the Web page in the background, if the activity has been closed, the page may continue to call JavaScript, so that the local can not find the context resources, such as error, so, in OnDestroy, must
Mwebview.stoploading ();
Mwebview.destroy ();
@Overrideprotected void OnDestroy () {//TODO auto-generated method Stubmwebview.stoploading (); Mwebview.destroy (); Super.ondestroy ();}
Android WebView Exit close voice web call JavaScript