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

AndroidAppmethodCode SnippetDelphiDemoFiremonkey

Access And Use The NFC (Near Field Communication) Hardware In Delphi XE7 Firemonkey On Android

Delphi XE7 Firemonkey Android NFC BridgeDevelopers Brian Long and Daniel Magin teamed up to enable NFC support on Android in Delphi XE7 Firemonkey. NFC stands for near field communication and it is a set of wireless technologies available on Android devices which only connects with other devices within 4cm. Brian Long has released a tutorial on how to get NFC support working in your own XE5, XE6, and XE7 projects (should work in AppMethod as well). First off it requires access to the NFC sensor and so you need to enable the NFC permission for your app in the Android manifest. There are also two different methods for accessing the NFC data which are the tag dispatch system and the foreground dispatch system. Both methods are covered in depth in the tutorial. The tag dispatch system mainly involves customizing the Android manifest and adding an XML file to your project. The foreground dispatch system is more difficult to achieve and involves overriding the Firemonkey Android NativeActivity. The code inherits from FMXNativeActivity and overrides the OnNewIntent event. The code for reading and responding to the NFC intents is placed in the new OnNewIntent event. The tutorial is really in depth so you’ll need to access it directly for all of the sample source code. There is also a blog post discussing the tutorial and it also contains links to the tutorial for each version of Delphi.

Head directly to the tutorial for implementing tag and foreground dispatch for NFC access in Delphi XE7 Firemonkey on Android.

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