【问题标题】:Is it possible for iOS triggering onNewIntent() in aos?iOS 可以在 aos 中触发 onNewIntent() 吗?
【发布时间】:2020-03-23 18:36:54
【问题描述】:

我希望开发应用程序来在 aOS 和 iOS 之间通过 NFC 交换数据。 对于 aOS 到 iOS,可以在 android 中模拟标签并从 iOS 读取。 但是,由于iOS CoreNFC没有开启HCE模式。我想知道 iOS 是否有任何方法可以触发 aOS 中的 onNewIntent() 函数,以便我可以将数据从 iOS 传递到 aOS通过onNewIntent()

【问题讨论】:

    标签: android nfc hce nfc-p2p core-nfc


    【解决方案1】:

    是的,可以在 Android 中模拟 NFC 标签,但您不要使用用于读取 NFC 卡的onNewIntent

    请参阅主机卡仿真文档https://developer.android.com/guide/topics/connectivity/nfc/hce

    然后,您将需要模拟使用 Android 设备存储 NDEF 消息的 4 类 NFC 卡,因为 iOS 只会读取(并在 iOS 13 中写入)来自 4 类卡的 NDEF 消息。

    关于如何模拟带有 NDEF 的 Type 4 卡的规范在 http://apps4android.org/nfc-specifications/NFCForum-TS-Type-4-Tag_2.0.pdf 的第 5 节中

    【讨论】:

    • 是的,我可以从 iOS nfc 阅读器应用程序读取 aos hce 但是我想问是否可以在 hce 模式下将值从 iOS 写入 aos?
    • 使用 iOS 13,您可以编写 NDEF,只要您的主机卡仿真处理更新 C-APDU D6h,就可以接收和发送数据。请参阅规范的第 5.4.7 节。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-24
    • 2017-07-27
    • 1970-01-01
    • 1970-01-01
    • 2017-03-18
    相关资源
    最近更新 更多