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 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE7 Firemonkey Android NFC Bridge | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSDevelopers 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

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging


Unleashing Creativity With Song Writer AI: A Deep Dive


How To Build Stable Diffusion Text To Image Prompts


FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

Leave a Reply