Last active
January 10, 2021 11:12
-
-
Save auyanik/9efd8d2a2e595d294759081af085ac3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun loadCaptcha() { | |
SafetyNet.getClient(activity) | |
.verifyWithRecaptcha(getString(R.string.key_captcha_client_sc_ky)) | |
.addOnSuccessListener(activity) { response -> | |
if (response.tokenResult?.isNotEmpty() == true) { | |
val captchaToken = response.tokenResult //Token elimize ulaştı | |
// Bu kısımda bu aldığımız token'ı | |
// Server kısmında yazacağımız onaylama(token doğrulama) api linki ne yollayacağız | |
// callCaptchaAuth(captChaToken) | |
} else { | |
//showToast("Captcha başarısız") | |
} | |
} | |
.addOnFailureListener(activity) { e -> | |
HandleCaptcha.errors(e.statusCode) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment