• 10
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I have uploaded the release APK to Google Playstore, but it is always rejected because of SslErrorHandler.

        @Override
        public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) {
            final AlertDialog.Builder builder = new AlertDialog.Builder(Registration.this);
            String message = "SSL Certificate error.";

            message += " Do you want to continue anyway?";

            builder.setTitle("SSL Certificate Error");
            builder.setMessage(message);
            builder.setPositiveButton("continue", 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();
        }
      • 1
    • I do not understand why this question was downvoted! Google thinks you are tricking user by hiding invalid ssl certificate problem (in other words enabling man-in-the-middle attack). I think this is automated check. Just use valid certificate, without onReceivedSslError handler.

A workaround is putting handler.proceed() and handler.cancel() in if else

@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    if (error.toString().equals("SSLError")) {
        handler.cancel();
    } else {
        handler.proceed();
    }
}

Good luck!

  • 1
Reply Report