Do not block the main thread!
Long requests to external systems such as storage, databases, hardware, and network have always been difficult to handle from a user experience point of view. For the programmers, it is simple to run the long request and when finished (after seconds, minutes, or hours), inform the user that their data are there. However, we should care about user experience, even more in the mobile world.
Getting ready
If your app runs a long-running request and the UI is frozen, the user might think that something is going wrong and start to tap here and there to try to unblock the app. After some seconds, if not the operating system itself, the user will push the Home button to close your app and then, usually, uninstall it. Yes, ...
Get Delphi Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.