Hello,
I have a problem here. I need to run a foreground service that requires about 1 or two minutes and some considerable level of processing and as in B4A it runs at the same thread of the gui this is freezing. The service has a loop (for ... next) which loads a json and decodes it, storing the results in a sqlite local database.
How can I run this service in background (using a foreground service with a icon - no problem) without to affect the user experience and navigation in GUI? Is it possible to run it in a separated thread ?
I have a problem here. I need to run a foreground service that requires about 1 or two minutes and some considerable level of processing and as in B4A it runs at the same thread of the gui this is freezing. The service has a loop (for ... next) which loads a json and decodes it, storing the results in a sqlite local database.
How can I run this service in background (using a foreground service with a icon - no problem) without to affect the user experience and navigation in GUI? Is it possible to run it in a separated thread ?