androidandroid-intentnfcndefhce

Start NFC reader by discover emulated NFC tag


I want to create a solution that by detecting an emulated NFC tag will start running a reader application on an android phone. I have found the unequivocal answer that in Android this is not possible. NFC card emulation with closed reader application However, it is already 8 years old. Has nothing changed to this day and is it still not possible in any way? No any work around? With intent filter TECH_DISCOVERED I can already trigger starting my app(of course, if there are no other applications that meet the tech-filter conditions, otherwise user can choose which one to use). For me seems ridiculous that such simple technology does not exist. Any help appreciated.


Solution

  • Yes something has changed, Android peer to peer (Beam) has been removed and deprecated from Android 10

    So if you use HCE on an Android 10 device you can have some success of starting an App via Intent Filters only

    Based on limited testing with devices I have and using the HCE App https://github.com/underwindfall/NFCAndroid and using the default and built Ndef Text Record display service (which does not use enableReaderMode but responds to NFC Intents if no other App is registered.

    The running HCE on Android 10 to an Android 9 device (This has Android Beam) without an enableReaderMode App works.

    The running HCE on Android 10 to an Android 8 device (This has Android Beam) without an enableReaderMode App fails.

    Android 8 HCE to 9 or 10 and Android 9 HCE to 8 or 10 fails the tests.

    Note while Google removed Beam from Android 10 stock/open source offering, they did allow manufacturers to add it back in and support it themselves, this was probably to allow some custom hardware manufacturers to still offer it.