in my android application i need to upload pdf to server in webview . according to the question, I used the Google DOC view at boot time. but my problem doesn’t show the file several times in webview , while in another instance it shows up quite well. I can not understand the problem. but the code looks fine. my code segment is as follows.
WebViewLable.getSettings().setJavaScriptEnabled(true);
WebViewLable.getSettings().setLoadWithOverviewMode(true);
WebViewLable.getSettings().setUseWideViewPort(true);
fullURL=GoogleDOCview+"https://livefarmer.com/labels/"+itemURL;
WebViewLable.loadUrl(fullURL);
}
private class Callback extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(
WebView view, String url) {
return(false);
}
}
and my webview is as follows.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/app_bg_black"
android:orientation="vertical" >
<include
android:id="@+id/nav_bar"
android:layout_width="fill_parent"
layout="@layout/nav_bar" />
<WebView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webViewLable"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:windowSoftInputMode="adjustResize" />
</LinearLayout>
this is logcat output when it does not show pdf.

this is logcat output when it shows pdf in webview.

So what's wrong with my code. How can I fix this. Thank you and welcome!