File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ __all__ = ("VerificationStateChangeCallback" ,)
2+
3+ from jnius import PythonJavaClass , java_method
4+
5+
6+ class VerificationStateChangeCallback (PythonJavaClass ):
7+ __javainterfaces__ = ["com/simplejnius/sjfirebase/callback/VerificationStateChangeCallback" ]
8+ __javacontext__ = "app"
9+
10+ def __init__ (self , on_code_sent , on_verification_completed , on_verification_failed ):
11+ self .on_code_sent = on_code_sent
12+ self .on_verification_completed = on_verification_completed
13+ self .on_verification_failed = on_verification_failed
14+
15+ @java_method ("(Ljava/lang/String;Lcom/google/firebase/auth/PhoneAuthProvider$ForceResendingToken;)V" )
16+ def onCodeSent (self , verification_id , token ):
17+ self .on_code_sent (verification_id , token )
18+
19+ @java_method ("(Lcom/google/firebase/auth/PhoneAuthCredential;)V" )
20+ def onVerificationCompleted (self , credentials ):
21+ self .on_verification_completed (credentials )
22+
23+ @java_method ("(Lcom/google/firebase/FirebaseException;)V" )
24+ def onVerificationFailed (self , exception ):
25+ self .on_verification_failed (exception )
You can’t perform that action at this time.
0 commit comments