We are using WebView to load paytm payment pages in our app. In this process we faced Ssl certificate error. To handle this we added SslErrorHandler.proceed() in our code. Everything is working fine. I tried publishing this apk to store, but the app got rejected mentioning
unsafe implementation of WebViewClient.onReceivedSslError handler
Here is my code
fcweb.getSettings().setJavaScriptEnabled(true);
fcweb.getSettings().setDomStorageEnabled(true);
fcweb.setLongClickable(false);
fcweb.setHapticFeedbackEnabled(false);
CookieManager.getInstance().setAcceptCookie(true);
fcweb.setWebViewClient(new WebViewClient(){
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed(); // Ignore SSL certificate errors
L.d("SSL Error received");
}
});
Note: I dont want to show any alert dialog regarding the error. What should I do to resolve this?