Android Question Thread and Exception

Roberto P.

Well-Known Member
Licensed User
Longtime User
HI All

I created a thread for a procedure a bit long. I see that in the case of exception, does not return the message in the log.

how can I do?

thanks

B4X:
private sub Import
    Dim mThread     As Thread
    mThread.Initialise("Thread1")
   
    Dim aOk As Boolean = mThread.Start(Me, "Import_Data", Array As Object(aBO))
end sub


Private Sub Import_Data (aParam As Object )


try



Catch
        Log(LastException)
    End Try


end sub
 

Roberto P.

Well-Known Member
Licensed User
Longtime User
Why do you need to create another thread? Can you post the Import_Data code?


I need another thread because I need to perform a data recalculation procedure (which does not reproduce because it has no effect on the problem) that blocks the main thread for too long time and blocking the App.
with another thread I solved the blocking issue, but in the case of error canno't I see in the log.

thank you
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hi Erel
There is another way to perform the procedure in the background without blocking the main application process?
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
The procedure works in the background and can take a long time to process data, this causes blockage of the application until it completes processing.
I hope it is clear.

thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…