We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a717214 commit 02217f5Copy full SHA for 02217f5
1 file changed
sjfirebase/jinterface/oncomplete.py
@@ -0,0 +1,13 @@
1
+from jnius import PythonJavaClass, java_method
2
+
3
4
+class OnCompleteListener(PythonJavaClass):
5
+ __javainterfaces__ = ["com/google/android/gms/tasks/OnCompleteListener"]
6
7
+ def __init__(self, callback):
8
+ super().__init__()
9
+ self.callback = callback
10
11
+ @java_method('(Lcom/google/android/gms/tasks/Task;)V')
12
+ def onComplete(self, task):
13
+ self.callback(task.isSuccessful())
0 commit comments