Android Question how to call a function asynchronously

Roberto P.

Well-Known Member
Licensed User
Longtime User
there is a way to call a function that works asynchronously from a procedure to carry out a long process without it being slowed?

For example: during the processing of a number of elements (30000), I need to update the GUI to view the processing status.

I tried to use DoEvents, but do not solve the problem.

I hope it is clear.
thank you
 

Roberto P.

Well-Known Member
Licensed User
Longtime User
CallSubDelayed is queued messages, then it is called at the end of the process and not good.
thanks
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I hope it is clear.
Per me sarebbe molto più chiaro in italiano :)

Più che asincrono mi sembra che ti serva sincrono, ovvero che possa andare in esecuzione mentre è in esecuzione il loop.

DoEvents dovrebbe funzionare; premetti un Activity.Invalidate oppure un Invalidate sulla View che devi aggiornare.


Try using the Invalidate method of the Activity or of the View you need to update, before DoEvents.
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
there is a way to call a function that works asynchronously from a procedure to carry out a long process without it being slowed?

For example: during the processing of a number of elements (30000), I need to update the GUI to view the processing status.

I tried to use DoEvents, but do not solve the problem.

I hope it is clear.
thank you
You have two solutions: using the Threading library or the CallSubExtended library of ProBundle (much easier).
 
Upvote 0
Top