是否可以在 Android 上读取与第三方应用程序的 NFC 通信?

Is it possible to read NFC communication with a third party app on Android?

我是 Android 的爱好应用开发者。带着这个问题我想看看NFC是否值得学习

我的目标是编写一个应用程序,该应用程序可以跟踪我在银行卡终端通过 NFC phone 支付的银行卡付款。

如何在标题中建议,我的问题是,如果我可以“嗅探”我的 bank-app 和银行卡终端的 NFC 流量并获得一些有关付款的信息。 进一步的问题,如果这不可能,是否可以通过某种方式直接与我的 bank-app 通信并获取信息?

简而言之,你不能嗅探 NFC 流量。

通常对于银行卡,它们被加载到主机无法访问的 NFC 控制器的安全元件中 OS。

参见 https://developer.android.com/guide/topics/connectivity/nfc/hce

上的说明

The secure element itself performs the communication with the NFC terminal, and no Android application is involved in the transaction at all. After the transaction is complete, an Android application can query the secure element directly for the transaction status and notify the user.

因此 phone 上安装的任何银行应用程序都与基于 NFC 的交易无关。

尽管您的银行应用程序可以执行此操作,但您或许可以在交易后查询安全元素。