title: Google Document Viewer shows “No Preview Available”
body: <p>I have a problem with google doc viewer for display xls file get from my server.</p>
  
  <p>Currently when i try to display my xls file get from my server in my android app with a webview, i have a grey page with no preview available
  (I can download the xls from my server with the url).
  <a href="https://i.stack.imgur.com/nKzEy.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nKzEy.jpg" alt="enter image description here"></a></p>
  
  <p>Sorry, I could not share link but It's like xxxx.com/123/DownloadExcel_GET?paraOne=%s&amp;paraTwo=%s&amp;paraThree=%s. </p>
  
  <p>But when i try with xls exemple file in internet like <a href="http://lecompagnon.info/demos/demoxl3.xls" rel="nofollow noreferrer">http://lecompagnon.info/demos/demoxl3.xls</a> , i don't have this problem. The xls is display succesfully.</p>
  
  <p>Same it's working if i try with a googleDrive url like "drive.google.com/file/t/myfile/view?usp=sharing".</p>
  
  <p>The only difference  with the exemple file in internet and my file from my server, is the time to start the download. 
      With the exemple file is instant, but with my xls i have to wait more than 10sec to start the download.</p>
  
  <p>I think google doc viewer return no preview available, because for him 10sec to get the file is too long and he return a time out. But it's a supposition...</p>
  
  <p>I found nothing about this problem, only this topic <a href="https://stackoverflow.com/questions/28918608/google-document-viewer-shows-no-preview-available">Google Document Viewer shows &quot;No Preview Available&quot;</a> .</p>
  
  <p>Here is my code :</p>
  
  <pre><code>String urlgoogle = "https://docs.google.com/gview?embedded=true&amp;url=";
  
          String completeURL = urlgoogle + query;
  
          Log.i("completeURL", completeURL);
          wv.getSettings().setJavaScriptEnabled(true);
          wv.loadUrl(completeURL);
          //wv.loadUrl("https://docs.google.com/gview?embedded=true&amp;url=" + "http://lecompagnon.info/demos/demoxl3.xls"); working
          wv.setWebViewClient(new WebViewClient() {
              public boolean shouldOverrideUrlLoading(WebView view, String url) {
                  view.loadUrl(url);
                  return false;
              }
          });
  </code></pre>
  
  <p><strong>edit</strong>
  I add more information.
  The grey page with no preview available not always showing, sometimes my xls file is display successfully the first time.</p>
  
  <p>If i have the grey page,  i can refresh, and after one or two refresh, the file is display. The refresh just call again the url in the webview</p>
  
  <p>The file is dynamically create and generated from the serveur, this is why for download or get the file i must wait 10 sec.</p>
  
  <p>Do Google doc viewer have a timeout if the time to get the file to display is too long ?</p>