Closed sanusi87 closed 8 years ago
In your case you need to use showChallengeAsync
. Try invoking showChallengeAsync
on your UI thread.
For historical reason, showChallenge
is synchronous and it touches UI components so it is only intended for use in SDKs prior to Honeycomb.
This issue is resolved in version 2.0.0.
I tried to reload the captcha once a user entered a wrong answer, I use this code:
then it throws NetworkOnMainThreadException. I tried running it inside AsyncTask, then an error notice appears saying that showChallenge() must be called from the UI thread, currently inferred thread is worker...
any suggestion?