Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiFiremonkeyIOSOSXWindows

Build Responsive Apps With Timers And Threads Using Delphi XE6 Firemonkey On Android And IOS

Delphi XE6 Firemonkey Asynchronous Apps Threads BackgroundMarco Cantu has a blog post up where he demonstrates various ways for building non-blocking or asynchronous apps using Delphi XE6 Firemonkey. While your app is doing work in the main thread of your application the user interface is blocked from responding to user input. Performing the operations in the background or asynchronously solves this problem. Marco shows how you can use a timer to kind of achieve background operations and leave your UI responsive to the user. Finally he shows how to use a thread (which is a better way of completing work in the background). We’ve covered threads on here before and especially the anonymous thread class which comes as an extra addon with Delphi Firemonkey. There are also some threaded dialogs you can use for when you are performing work. Some of the comments on the blog post talk about the Application.ProcessMessages; function which you can use within loops to keep your app responsive even while performing work. Generally it is considered bad to use Application.ProcessMessages; but I usually do it anyway. If you want to take advantage of multiple CPUs in your device you can do parallel processing with loops. These same ideas apply across Delphi XE5, XE6, AppMethod, Android, IOS, Windows, and OSX. Try them out and see which one works best for you.

Head over and check out the full blog post by Marco about performing operations in the background of your apps.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS


Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux


Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows


Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

Sign up for our Newsletter and
stay informed

Leave a Reply