Code example for WebStorage.QuotaUpdater

Methods: updateQuota

0
 
    myWebView.setWebViewClient(new WebViewClient() {
      @SuppressWarnings("unused") 
      public void onReachedMaxAppCacheSize(long spaceNeeded,
          long totalUsedQuota, QuotaUpdater quotaUpdater) {
        quotaUpdater.updateQuota(spaceNeeded * 2);
      } 
    }); 
    // this is necessary for "alert()" to work 
    myWebView.setWebChromeClient(new WebChromeClient());
    setVolumeControlStream(AudioManager.STREAM_MUSIC);
    // allows the control to receive focus 
    // on some versions of Android the webview doesn't handle input focus 
    // properly 
    // this seems to make things work with Android 2.1, but not 2.2 
    // myWebView.requestFocusFromTouch(); 
 
    // recordAudio(javaScriptInterface); 
  } 
 
  private void recordAudio(JavaScriptInterface javaScriptInterface) {