This is a follow up of my previous post where in we saw how to load https pages/URLs from Android Webview. But there was a problem that we needed to solve, which was, Your Application Has An Unsafe Implementation Of the WebViewClient.onReceivedSslError Handler.
To solve this, you need to notify the users of the navigation from https to http. In this post we'll do this by simply adding an alert dialog with Proceed and Cancel buttons. Just add the below code in your corresponding Activity class and you're all done:
@Override public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) { final AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("Your security warning message here"); builder.setPositiveButton("proceed", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { handler.proceed(); } }); builder.setNegativeButton("cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { handler.cancel(); } }); final AlertDialog dialog = builder.create(); dialog.show(); }
Try submitting your app now and you should see that there is no more of that Security message which you saw earlier.
See you around.
security guard companies venturaca can assist you completely regarding on how to hire the best possible guard! I have got the relief and I would definitely like everyone to utilize their experiences as well!
ReplyDeletehmmmm
ReplyDeleteThis is something that will help you in arranging everything in the recommended way and monitoring things. On the off chance that conceivable you should attempt and converse with a portion of the specialists who will help you in building a great Phone application. website to app
ReplyDeleteGuards need progression in an organization and they tend to work harder and in amicability if there is opportunity. The inverse is valid if the organization offers little progression.ekran system
ReplyDeleteThank you for sharing! This is exactly what I need!
ReplyDeleteinstagram technology
You will diminish "time robbery," as representatives forgetting early or hanging with companions amid working hours. This by itself will make your business increasingly beneficial and enable you to run your organization all the more easily. Witty Spy
ReplyDeleteKeep it up..
ReplyDelete