Я использую проверку подлинности с помощью Firebase для проверки подлинности.Код прекрасно работает на большинстве устройств, но показывает 'com.google.firebase.auth.FirebaseAuthException'
на OPPO A37fw .
Это мой код, и он отлично работает на всех устройствах, включая другие устройства Oppo. Только на OPPOA37fw эта ошибка показана.
PhoneAuthProvider.OnVerificationStateChangedCallbacks callbacks
= new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {
@Override
public void onVerificationCompleted(PhoneAuthCredential credential) {
Log.d(TAG, "onVerificationCompleted:" + credential);
MobileVerification.credential = credential;
openOTPvalidation(ON_VERIFICATION);
}
@Override
public void onVerificationFailed(FirebaseException e) {
postException(context, TAG, e);
}
@Override
public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken token) {
super.onCodeSent(s, token);
verificationCode = s;
forceResendingToken = token;
openOTPvalidation(OTP_SEND);
}
};
private void getOTP() {
if (activity != null) {
pDialog = SupportingMethods.showDialogLoading(activity);
pDialog.show();
}
String mobile = "+91" + mob;
PhoneAuthProvider.getInstance().verifyPhoneNumber(
mobile, // Phone number to verify
60, // Timeout duration
TimeUnit.SECONDS, // Unit of timeout
activity, // Activity (for callback binding)
callbacks); // OnVerificationStateChangedCallbacks
}
И Logcat показывает:
com.google.firebase.auth.FirebaseAuthException: This app is not authorized to use Firebase Authentication. Please verifythat the correct package name and SHA-1 are configured in the Firebase Console. [ App validation failed ]
at com.google.firebase.auth.api.internal.zzdr.zzb(Unknown Source)
at com.google.firebase.auth.api.internal.zzet.zza(Unknown Source)
at com.google.firebase.auth.api.internal.zzew.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:160)
at android.app.ActivityThread.main(ActivityThread.java:5541)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
************ DEVICE INFORMATION ***********
Brand: OPPO
Device: A37f
Model: A37fw
Id: LMY47V
Product: A37fw