LAMW problem with jProgressBar invalidate lazarus / 43-Android ---------------------------------------------------------------------- xinyiman · 2022-01-31 14:35 Hi, I have a procedure that downloads more than 60,000 records from a json server and I would like to show the update through the progressbar. I use this code: for ... do begin                          if (Self.ProgressBar1.Progress mod 100)=0 then                          begin                             Self.ProgressBar1.Invalidate;                             //Self.Invalidate;                          end; end; But it does not work. I see the progressbar update only when it has finished the whole loop. How do I resolve? Thank you ---------------------------------------------------------------------- loaded · 2022-01-31 16:49 Hi, The operation you want is done using AsyncTask. LAWM has a sample demo on this subject. You can find it in the ....\lazandroidmodulewizard- master\demos\GUI\AppAsyncTaskDemo1  folder on your system. ---------------------------------------------------------------------- xinyiman · 2022-02-04 13:36 I tried the example you suggested, but I have two problems. 1. If I don't put the sleep in the DoTask the program crashes 2. If in the DoTask I enter jSqliteDataAccess1.InsertIntoTable(sql);            crashes. My need is to populate a sqlite db with more than 65000 records retrieved from a json on web server. I can download the json but I can't save it in sqlite and at the same time update the progress bar. ---------------------------------------------------------------------- xinyiman · 2022-02-04 15:00 Forget it, I fixed myself with recursive jtimers where I process N records at a time.