This repository was archived by the owner on Jun 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
This repository was archived by the owner on Jun 19, 2018. It is now read-only.
Synchronous calls not working #1
Copy link
Copy link
Open
Description
I have an issue with synchronous login when I call it from the main thread. I wanted to make my login synchronous because I use it in Rx chain and I don't want to have callbacks.
Response<ResponseZerokitLogin, ResponseZerokitError> r = Zerokit.getInstance().login(zerokitId, mPasswordET.getPasswordExporter(), true).execute();
Here is my log:
java.lang.IllegalStateException: Sync method call from the main thread is only possible after the initialization was finished.You can call sync method from background thread any time, or from main thread after the initialization is done. You can call async method from any looper thread any time
at com.tresorit.zerokit.Zerokit$CallAction.checkThreadSync(Zerokit.java:1407)
at com.tresorit.zerokit.Zerokit$CallAction.execute(Zerokit.java:1447)
at de.gesundheitscloud.sdk.view.HCLoginActivity$1.onClick(HCLoginActivity.java:44)
at android.view.View.performClick(View.java:4756)
at android.view.View$PerformClick.run(View.java:19749)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
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:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
I have also tried to do initialize zerokit again with: Zerokit.getInstance().initMain(); but then I get ANR when I try to login.
Metadata
Metadata
Assignees
Labels
No labels