Android : paypal website malformed in android webview

on Thursday, August 14, 2014


I am trying to open paypal checkout website inside of android webview, but in some devices it opens with malformed graphics or with loading progress bar which is loading to infinity. And in other devices paypal opens normally as it should.


this is the code which runs webview:



mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWebView.addJavascriptInterface(new JsObject(), "injectedObject");

mWebView.setWebChromeClient(new WebChromeClient(){

@Override
public boolean onJsAlert(WebView view, String url, String message,
JsResult result) {
return super.onJsAlert(view, url, message, result);
}

});
mWebView.setWebViewClient(new WebViewClient(){

@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return false;
}

});

String postData = "some data";
mWebView.postUrl("url",
EncodingUtils.getBytes(postData, "base64"));


I was looking for some solution but I found nothing. I guess that there must be something with webview settings but I have no idea what to change.


Does anybody know how to solve this problem? Any advice will be appreciated.


0 comments:

Post a Comment