We are developing an mobile app where different user will download our app from play store. Once the app is launched they
will allowed to first register (Signup) them-self to Particle Cloud and then it will register(Setup Device) in the Next step.
We get stuck at register process i.e. signup process. We found that there is API available with SignupWithUser method.
@rakeshjiyani if you print the stack trace of the exception being thrown, you’ll see that the error you’re getting is ultimately caused by android.os.NetworkOnMainThreadException.
Most of the methods on ParticleCloud are (very intentionally) blocking calls which hit the network, meaning that you can’t call them from the main thread.
The SDK has been carefully annotated with @WorkerThread for all blocking calls like this, though, so you should be seeing an warning in Android Studio saying something like: Method signUpAndLogInWithCustomer must be called from the worker thread, currently inferred thread is main thread…
If you’re not seeing that error, you’re either working with an outdated version of Android Studio, or you have suppressed this warning. If it’s the latter, I strongly advise against that, since that warning would have saved you from this issue!