Hello All!
I iterate long file inserting into DB using single line inserts (couple of blocks like loop while lines available (parse line, insert line into db). It can take a while.
I
Will AppInventor runtime protect me against ANR (application not responding error) ?
If not, what should I do (call) so to allow app to process user events ?
Please note that with single-row inserts I do want to avoid async inserts (that would create need for global variables that I do not like - I'd rather call something each 100 inserts).
Regards
Thanks for prompt reply and suggestion.
My question however is about learning AppInventor and the db operation is an example- the question is about handling long loops in GUI thread.
There are 2 cases:
Long blocking operation (e.g. BluetoothClient.Connect) - these I handle using co.sgext_.asyncprocedure.aix
Long loops of short operations - I do not know if AppInventor implementation is makes it "blocking" or not...
Regards
For a long computation like a Sieve of Eratosthenes prime number finder demo, I have found it necessary to break up the computation into a list feeding a Clock Timer.
Most long running activities have completion events.