Issue
I have tried this
private void setUpWebView() {
mWebView = new WebView(getContext());
mWebView.setVerticalScrollBarEnabled(false);
mWebView.setHorizontalScrollBarEnabled(false);
mWebView.clearCache(true);
mWebView.setWebViewClient(new OAuthWebViewClient());
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.clearFormData();
mWebView.getSettings().setSavePassword(false);
mWebView.getSettings().setSaveFormData(false);
//Make sure no caching is done
mWebView.getSettings().setCacheMode(mWebView.getSettings().LOAD_NO_CACHE);
mWebView.getSettings().setAppCacheEnabled(false);
mWebView.clearHistory();
//Make sure no autofill for Forms/ user-name password happens for the app
mWebView.clearFormData();
mWebView.getSettings().setSavePassword(false);
mWebView.getSettings().setSaveFormData(false);
mWebView.loadUrl(mUrl);
Log.d("TAG", "onPageFinished URL:" + mUrl);
mWebView.setLayoutParams(FILL);
mContent.addView(mWebView);
}
Solution
Please add this line for enable cookies for your WebView:
CookieManager.getInstance().setAcceptCookie(true);
Answered By - Mahesh Kavathiya
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.