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+ from typing import Callable
2+
3+ from jnius import PythonJavaClass , java_method
4+
5+ __all__ = ("AuthStateListener" , "IdTokenListener" )
6+
7+
8+ class AuthStateListener (PythonJavaClass ):
9+ __javainterfaces__ = ["com/google/firebase/auth/FirebaseAuth$AuthStateListener" ]
10+ __javacontext__ = "app"
11+
12+ def __init__ (self , callback ):
13+ self .callback = callback
14+
15+ @java_method ("(Lcom/google/firebase/auth/FirebaseAuth;)V" )
16+ def onAuthStateChanged (self , auth ):
17+ self .callback (auth )
18+
19+
20+ class IdTokenListener (PythonJavaClass ):
21+ __javainterfaces__ = ["com/google/firebase/auth/FirebaseAuth$IdTokenListener" ]
22+ __javacontext__ = "app"
23+
24+ def __init__ (self , callback ):
25+ self .callback = callback
26+
27+ @java_method ("(Lcom/google/firebase/auth/FirebaseAuth;)V" )
28+ def onIdTokenChanged (self , auth ):
29+ self .callback (auth )
You can’t perform that action at this time.
0 commit comments