@Override public boolean OnVerifiyCertificate(String subject, String issuer, String fingerprint) { // see if global settings says accept all if (GlobalSettings.getAcceptAllCertificates()) return true; // this is where the return code of our dialog will be stored callbackDialogResult = false; // set message String msg = getResources().getString(R.string.dlg_msg_verify_certificate); msg = msg + "\n\nSubject: " + subject + "\nIssuer: " + issuer + "\nFingerprint: " + fingerprint; dlgVerifyCertificate.setMessage(msg); // start dialog in UI thread uiHandler.sendMessage(Message.obtain(null, UIHandler.SHOW_DIALOG, dlgVerifyCertificate)); // wait for result try { synchronized (dlgVerifyCertificate) { dlgVerifyCertificate.wait(); } } catch (InterruptedException e) { } return callbackDialogResult; }