2

I'am making a game and make a website to store the Score Board when I call the webservise the old Score Board appears !!! I tried to open the webServise from the android browser but the browser appears the old Score Board when i "refresh" android web Browser the new one appears how can I Solve this Problem? this is my app link on the play store I need to update it soon

My Application

3 Answers 3

2

I am using web Service not WebView and finally I found the solution

 HttpGet httpget = new HttpGet("http://example.com/dir/page.php?"+r.nextInt(1000));

putting a random number as a parameter make the request Different
thanx all

1

I assume you're using a WebView.

It's actually really simple. You should have Googled for "android webview disable cache" and you would see multiple resources...

WebView browser = new WebView(this);
WebSettings settings = browser.getSettings();
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
1
wv.addJavascriptInterface(new JavaScriptInterface(wv), "JSI"); -



  private class JavaScriptInterface {   
 private final WebView m_wv;  
  public JavaScriptInterface(WebView wv)
 {       m_wv = wv;   
 }  
  public void reload() 
{       m_wv.reload();   
} } 

See more at: http://gurushya.com/customizing-android-webview/#sthash.X87HCv01.dpuf

or other way is:

webView.loadUrl( "javascript:window.location.reload( true )" );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.