Easily Handle Intent Callbacks In FireMonkey With Delphi 10 Berlin On Android

Delphi 10 Berlin Android Callback Firemonkey Intent JavaBrian Long has a new blog post up which explains handling Android callbacks with Firemonkey in Delphi 10 Berlin. If you are doing Android programming, you are surely familiar with the callback system that handles either the events from an intent filter or passing of data between Activities. Obviously this is only for Android and not IOS, OSX, or Windows. In previous versions (Delphi XE5, XE6 and XE7), you had to deal with custom Java code, custom activity sub-classing and other boilerplate code. But with the new Delphi Berlin, the callbacks are picked up by the FireMonkey activity’s onNewIntent method and sent into the RTL cross-platform messaging system. You can write your own code to process the new intents. This intent messaging is done via an additional use of the Android-specific TMessageReceivedNotification message (these messages contain an instance of JIntent then wraps and Android intent). It is IFMXApplicationService, that provides cross-platform access to event notifications so that you do not need to use a different, platform-specific event system on each platform that your application targets. When IFMXApplicationService receives an event notification from the operating system, it generates a message object (TMessage or one of its descendants) to provide the event data. The message object contains read-only information about the event that occurred. Thus, with Delphi Berlin it is now simpler to handle the intents received from hardware (camera, bar-code scanner, or any other device), no boilerplate code, easier debugging.

Head over and read the full blog post from Brian about Android callbacks for FireMonkey with Delphi 10 Berlin.

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

Easily Handle Intent Callbacks In FireMonkey With Delphi 10 Berlin On Android by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi 10 Berlin Firemonkey Windows Shaders Direct3D HLSL
Realistic Custom Shaders With HLSL In Direct3D With Delphi 10 Berlin FireMonkey On Windows

Developer Masanori Nakayama has a project over on Github which demonstrates how to use Direct3D HLSL shaders from Delphi 10...