i try to do automatic fill of sms code ,I am using firebase, in function oncodesent is send the code, and after that i want to pass the verficiation code to another functions, and the oncreate to use him , the problem is this method is void by default (i cant do return), And when i try to save it to another variable is always null except from the oncodesent method, Can anyone know how to fix it?
this is the function
@Override
public void onCodeSent(@NonNull String verificationId,
@NonNull PhoneAuthProvider.ForceResendingToken token)
{
super.onCodeSent(verificationId, token);
Intent intent = new Intent(RegistrationActivity.this, RegistrationActivity.class);
intent.putExtra("verificationId", verificationId);
Toast.makeText(RegistrationActivity.this, "Code sent", Toast.LENGTH_SHORT).show();
btnJoinNl.setEnabled(true);
flagVerification=true;
how I pass the verificationId to other functions in this activity?