Android dynamic UI update from AsynchTask/Handler and Thread priorities
There must be another issue with your code. Try posting your AsyncTask in here. You could also try something very basic like: Create a new Thread that loops every 25Hz and update your UI by using the post() method of your UI elements or the runInUiThread() of your Activity. See if there's any code still running inside the UI Thread, that could do heavy work, that can be done outside the UI Thread.
I tried literally everything except for the most logic thing, trying the application without the debugger connected. The reason to have slower simulation than in a PC, to freese UI events... all because the debugger takes a lot of resources from the device. So, I guess that from this point and avobe I will have to test the application without debugger, what forces me to reboot the phone each time to avoid the "waiting for debugger to connect". Thank to all who tried.
I could be wrong, but I think that yours problem in synchronization on simulator.getSimulationResults() object. I can't see the realization of the simulator class and realization of the object returned by getSimulationResults(), but I suppose that getSimulationResults() returns the same object every time? If so, then it can be looks like this: In the AsyncTaks call simulator.getSimulationResults().updateSimulation(...). If this method is synchronized, then this call will be lock the SimulationResults object for AsyncTaks thread. updateSimulation(...) returns, and publishProgress() is called, but publishProgress() is only schedule the onProgressUpdate(Void... values) in the UI thread. The new iteration in the AsyncTaks thread can be started befor the UI thread gets the control and executes onProgressUpdate(Void... values). So, AsyncTaks thread goes to the first step. The UI thread gets the control and executes the onProgressUpdate(Void... values) and synchronized void updateHUD() methods, but updateHUD() can't be executed, because SimulationResults object is locked by the AsyncTaks thread in the updateSimulation(...) method. So the UI thread returns the control to the OS. This may occur many times. So, onProgressUpdate(Void... values) method and all events in the UI thread can be executed only if the UI thread gets the control in the right moment when updateSimulation(...) method is not called in the AsyncTask thread. You can check this idea by replacing the public synchronized void update HUD() on the public void update HUD(), and write something randomly in the TextView. In any case, the use of AsyncTask in this case is not the best idea. AsyncTask's are executed in the TheadPool, but in the Android system this pool can consist from only one thread. So, all AsyncTask's will be executed one by one in the one thread.
Android set ringtone (Call, Notification, Alarm) from mp3 on raw folder
ListItem click and checkbox click at the same time
How to display a (modal) dialog at the very start of the app?
Refresh ListView from ArrayAdapter
Spanned Textview HTML formatting only applies to last in loop?
android-toolbox showcase crashing
Android setText / R.string / values
finding height and width for different devices
Android support screen design
Admob doesn't count clicks
error in the transfert image
fade effect for background screen while pop up opens using Flex 4 and as3
GCM does not show registration ID on first time execution?
When I clean project in android using clean option, R.java is removed from gen file [duplicate]
Why WiFi connection drops while on a call in Android
Live Wallpaper preferences in launcher