A androidappl Active Member Licensed User Longtime User Oct 29, 2014 #1 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.
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.
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2014 #2 Are you using the Threading library? Upvote 0
A androidappl Active Member Licensed User Longtime User Oct 29, 2014 #3 Erel said: Are you using the Threading library? Click to expand... Not i use the sub and protocol HTTP, with metode parse "JSON" and find this error: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Upvote 0
Erel said: Are you using the Threading library? Click to expand... Not i use the sub and protocol HTTP, with metode parse "JSON" and find this error: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2014 #4 Can you post the relevant code? Upvote 0
A androidappl Active Member Licensed User Longtime User Oct 29, 2014 #5 Erel said: Can you post the relevant code? Click to expand... There is so much code that is called in several places. However let's say I solved with some trick ... The problem amongst other things it appeared only when the application run in release mode, debug mode everything worked ... Upvote 0
Erel said: Can you post the relevant code? Click to expand... There is so much code that is called in several places. However let's say I solved with some trick ... The problem amongst other things it appeared only when the application run in release mode, debug mode everything worked ...
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2014 #6 Your code should always run on the main thread, unless you are doing something "special" like using the Threading library. Upvote 0
Your code should always run on the main thread, unless you are doing something "special" like using the Threading library.
A androidappl Active Member Licensed User Longtime User Oct 29, 2014 #7 Erel said: Your code should always run on the main thread, unless you are doing something "special" like using the Threading library. Click to expand... I think the problem is that the library webviewextra a problem thread. Practically exhaust html and using regular expressions recovery data Upvote 0
Erel said: Your code should always run on the main thread, unless you are doing something "special" like using the Threading library. Click to expand... I think the problem is that the library webviewextra a problem thread. Practically exhaust html and using regular expressions recovery data
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2014 #8 You can use the Threading library to run code on the main thread. This can be useful if this library raises an event on a different thread. Upvote 0
You can use the Threading library to run code on the main thread. This can be useful if this library raises an event on a different thread.
A androidappl Active Member Licensed User Longtime User Oct 29, 2014 #9 Erel said: You can use the Threading library to run code on the main thread. This can be useful if this library raises an event on a different thread. Click to expand... Oh ok now I understand thank you very much. If I were to happen again I will follow his advice. Upvote 0
Erel said: You can use the Threading library to run code on the main thread. This can be useful if this library raises an event on a different thread. Click to expand... Oh ok now I understand thank you very much. If I were to happen again I will follow his advice.
A androidappl Active Member Licensed User Longtime User Dec 23, 2014 #10 How does the threading library ? if I have to make a http request using the library webviewExtra you an example ? Thank you very much Upvote 0
How does the threading library ? if I have to make a http request using the library webviewExtra you an example ? Thank you very much
Erel B4X founder Staff member Licensed User Longtime User Dec 24, 2014 #11 You don't need to use the threading library for http requests. They are handled in the background. Upvote 0
D Derek Jee Active Member Licensed User Longtime User Jun 8, 2015 #12 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
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.
DonManfred Expert Licensed User Longtime User Jun 8, 2015 #13 Derek Jee said: will this get done in the background too or in the UI thread Click to expand... in the UI thread Upvote 0
Derek Jee said: will this get done in the background too or in the UI thread Click to expand... in the UI thread
D Derek Jee Active Member Licensed User Longtime User Jun 8, 2015 #14 DonManfred said: in the UI thread Click to expand... Threading library it is then !! Thanks Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 9, 2015 #15 That is not correct. The response is retrieved in the background. Use HttpUtils2 and it will be very simple. Upvote 0
That is not correct. The response is retrieved in the background. Use HttpUtils2 and it will be very simple.
D Derek Jee Active Member Licensed User Longtime User Jun 9, 2015 #16 Erel said: That is not correct. The response is retrieved in the background. Use HttpUtils2 and it will be very simple. Click to expand... 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
Erel said: That is not correct. The response is retrieved in the background. Use HttpUtils2 and it will be very simple. Click to expand... 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..
Erel B4X founder Staff member Licensed User Longtime User Jun 9, 2015 #17 JobDone event is executed in the main thread. The SQL library does support asynchronous commands. The first thing to do is to test it and see whether it is fast enough or not. Upvote 0
JobDone event is executed in the main thread. The SQL library does support asynchronous commands. The first thing to do is to test it and see whether it is fast enough or not.
D Derek Jee Active Member Licensed User Longtime User Jun 9, 2015 #18 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
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.