Closed oradkovsky closed 1 year ago
Btw this approach works fine:
Braze.getInstance(this).getCurrentUser(brazeUser ->
brazeUser.addAlias(
"some alias",
"some label"
)
);
Hi @oradkovsky ,
The synchronous method style of .getCurrentUser()
is a blocking call and thus can take a variable amount of time to unblock the main thread. As a result, if calling on the main thread, we recommend using the asynchronous style of https://appboy.github.io/appboy-android-sdk/kdoc/braze-android-sdk/com.braze/-i-braze/get-current-user.html , which is your second reply.
Thank you, that turns my bug report into misuse report :) Still one question left: why the same code worked < sdk 31
Braze Android SDK Version
23.2.1
Steps To Reproduce
Main thread (app instance for example) execution:
Expected Behavior
No ANR? Unless, of course, the code meant to be called off main thread (in that case I found no documentation proof)
Actual Incorrect Behavior
ANR
Verbose Logs
No response
Additional Information
Only as of sdk31 devices