Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey, Delphi Android, Delphi IOS

Post And Handle Internal Messages With Delphi XE5 Firemonkey On Android And Windows

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE5 Firemonkey Messaging System | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSFrançois Piette has a code snippet up where he shows how to build an object messaging system for Windows and Android in Delphi XE5 Firemonkey. The code demonstrates creating a TMessagingSystem object which implements and handles a message system or queue. A messaging system allows one part of your app to talk to other parts of your app asynchronously. You can have a thread where you use a PostMessage() function to asynchronously send messages to your main app and then read and handle the messages out of the queue. Both implementations (the Windows and Android versions) use native APIs on their respective platforms to accomplish the task. The sample code also has demo code which shows a clear example of how to use the messaging system with threads to get a job done. If you’re use to using messages on Windows to get a job done or you just want to architect your app to be more asynchronous then take a look at this and try out the messaging system for Android.

Head over and check out the source code for posting and handling messages on Windows and Android.

Exit mobile version