Android Question Error thread, help please

androidappl

Active Member
Licensed User
Longtime User
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.

The problem stems from the fact that in debug mode does not go astray, while in release mode goes wrong.
 

Derek Jee

Active Member
Licensed User
Longtime User
Hi Erel

What about the response from the request. If I am expecting to process some data on the back of a response, will this get done in the background too or in the UI thread?

I'd like to run it so the UI does not freeze up..


Thank you!

Derek.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Derek Jee

Active Member
Licensed User
Longtime User
That is not correct. The response is retrieved in the background. Use HttpUtils2 and it will be very simple.
Hi Erel

So if I get a response and need to do processing into a database, format some text do some other events, that this will not be done by the main UI but in a background thread?

Thank you for responding..
 
Upvote 0

Derek Jee

Active Member
Licensed User
Longtime User
Thank you Erel

I should have been more precise with my question. Yes the response is but the JobDone isn't. I am downloading a text file which I have to process before adding data into my database. It is that processing which needs a separate thread to run in..

Thank you again and looking forward to using version 5..

Derek.
 
Upvote 0
Top