Hi @,
We are using clover CFP SDK to communicate with the customer-facing device. We are using the following dependency and code to connect with the customer-facing terminal:
Dependency:
com.clover.cfp:clover-cfp-sdk:4.2.1
Code:
remoteDeviceConnector = RemoteDeviceConnector(this, cloverAccount)
val car = CustomActivityRequest(CUSTOM_ACTIVITY_NAME, payload)
executor.execute {
remoteDeviceConnector!!.startCustomActivity(car, object : CustomActivityListener {
override fun onMessageFromActivity(message: MessageFromActivity) {
Log.e("ACCOUNT","onMessageFromActivity000000----"+message.payload)
runOnUiThread {
Toast.makeText(this@POSActivity, message.payload, Toast.LENGTH_SHORT).show()
}
}
override fun onCustomActivityResult(response: CustomActivityResponse) {
Log.e("ACCOUNT","response.failReason----"+response.failReason)
Log.e("ACCOUNT","response.payload----"+response.payload)
Log.e("ACCOUNT","response.name----"+response.name)
Log.e("ACCOUNT","response.result----"+response.result)
Log.e("ACCOUNT","response.isSuccess()----"+response.isSuccess())
runOnUiThread {
Toast.makeText(this@POSActivity, response.payload, Toast.LENGTH_SHORT).show()
}
}
})
}
But this is not connecting and the log looks like below:
E/ACCOUNT: response.failReason----Not connected
E/ACCOUNT: response.payload----null
E/ACCOUNT: response.name----com.cfpdemoapplication.POSActivity
E/ACCOUNT: response.result----0
response.isSuccess()----true
Why it is not connecting while the merchant facing device is connected properly with the USB connection cord, and our custom activity's application is open at the customer-facing device?
If we open the USB pay display app in the background at the customer-facing device then it connects successfully and works fine.
Should we need to add source code in my custom customer-facing application to accept the USB connection?
Please suggest.
Note: We are trying integration like https://docs.clover.com/docs/using-customer-facing-platform.