limelect 48 Posted August 11, 2020 (edited) In an application, I am using Marco Cantu https://blog.marcocantu.com/blog/2014_may_background_delphi_android_threads.html Thread. I have 2 questions 1. I am concerned pressing a button many times does not leave-in memory the last thread or do I have to make sure that before I create a new TThread.CreateAnonymousThread(procedure () that the old one does not exist? 2. On the same program, I would like to use Toast. (Using Notify works). I am trying to put Toast in Synchronize TThread.Synchronize(TThread.CurrentThread, procedure() begin {$IFDEF POSIX} ToastManager1.Toast('Finished Loading Contacts'); // ToastManager1. // FMXToast1.ToastMessage:='aaaaaa'; // FMXToast1.Show(self); // NotifyComplete; {$ENDIF} end); Android gives me a message NO DUPLICATE ALLOWED. So I guess I have to put the TOAST statement outside the thread. Any idea how to? I could put a flag and with timer use it but I do not like the idea. Edited August 11, 2020 by limelect Share this post Link to post
limelect 48 Posted August 11, 2020 It seems that moving the toast function to another form is the solution to my second question. I wonder why? Still, if someone can answer the first question. Thanks Share this post Link to post