条带卡读卡器位置在Android上即将为空

8dtrkrch  于 2023-05-12  发布在  Android
关注(0)|答案(1)|浏览(100)

我们正面临一个问题,连接到读卡器到Android应用程序.以下是我们遵循的步骤:1-打开读卡器:我们有“条纹阅读器M2”。我们点击阅读器上的按钮,它的灯打开,然后再关闭。我们假设它已打开。
2-连接读卡器:我们首先转到Android蓝牙设置并在那里配对阅读器。它似乎成功配对,因此我们认为阅读器已打开。
3-在Android上,我遵循文档,并试图发现设备。

val config = DiscoveryConfiguration(20, DiscoveryMethod.BLUETOOTH_SCAN , false) 
    Terminal.getInstance().discoverReaders(config, object : DiscoveryListener {...}, object : Callback {...})

  PROBLEM: I get the callback "onUpdateDiscoveredReaders" and there I see the reader, but the reader's location->id is 'null'. Its label and id  are also 'null'. Its serialNumber is the above string "STRM2..."
  Also, I am getting the error BLUETOOTH_SCAN_TIMED_OUT in onFailure Callback in discoverReaders.

    I need the "reader->location->id" in BluetoothConnectionConfiguration. 

    If I set isSimulated = true in DiscoveryConfiguration, then it works, and the simulated reader is connected.

请指导我们缺少什么。

qv7cva1a

qv7cva1a1#

reader.location为null,如果读取器还没有注册到一个位置-更多细节请参见https://stripe.com/docs/terminal/fleet/locations
如果你还没有这样做,你应该:
1.创建位置:https://stripe.com/docs/api/terminal/locations/create
1.将读卡器注册到位置:https://stripe.com/docs/terminal/fleet/locations#register-bluetooth-readers

相关问题