gpt4 book ai didi

java - 如何在Android钱包应用程序中检测POS交易?

转载 作者:行者123 更新时间:2023-12-01 12:47:49 25 4
gpt4 key购买 nike

我正在使用 SEEK API 和 NFC 开发 Android 钱包应用程序。我的 Sim 卡上安装了 Visa 小程序。我的问题是,如何检测与POS终端的联系是否成功? Android 中是否有可用的 Intent Action,我可以将其放入某些 Activity 或某些接收器中?

谢谢。

最佳答案

其实我找到了检测POS终端交易的方法。 NFC API TRANSACTION_DETECTED 被隐藏。当交易存在时,TagDetectedActivity 将启动。

<activity android:name=".TagDetectedActivity" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.nfc.action.TRANSACTION_DETECTED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="nfc" android:host="secure" android:port="0" android:pathPrefix="/axxxxx" />
</intent-filter>
<intent-filter>
<action android:name="com.gsma.services.nfc.action.TRANSACTION_EVENT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="nfc" android:host="secure" android:port="0" android:pathPattern="/.*/axxxxx.*" />
</intent-filter>
</activity>

关于java - 如何在Android钱包应用程序中检测POS交易?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24520773/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com