Ultra basic NFC-HCE helloworld example using .Net MAUI and VisualStudio 2022.
Tested Environment:
- Win10
- VisualStudio 2022
No need to install any Android related tools/packages (taken care of by VS2022)
- Open 'Maui_NFC_HCE.sln' using VS2022
- Build solution
- Plug your Android phone via USB
- Select appropriate target device
- Deploy / Run or Debug
Present phone to HF reader (potentially leveraging PCSC Contactless interface)
Example AID: '315041592E5359532E4444463031' (see here)
=> Perform Cold/Warm Reset
<= ATR: 3B888001000000008081710079
=> 00A404000E315041592E5359532E444446303100
<= Sw: 9000
Notes:
- A delay of 500ms has been introduced in the code to simulate workload.
- Albeit NFC NDEF TAGs APIs are now available, sadly Apple has not opened their NFC HCE API, with no indication they plan to in near future. :(. Hence it is not available on iOS.
Screenshot of application running on Samsung Galaxy S8, Android v9 - API 28.