question

Sukhbir Singh avatar image
Sukhbir Singh asked Sukhbir Singh action

Urgent: Clover cfp SDK's RemoteDeviceConnector is not connecting with the Customer facing terminal

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.


Clover Android SDKClover Minisemi-integrationsclover developer communityClover Flex
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

David Marginian avatar image
David Marginian Deactivated answered mybmr edited

Are you trying to use Remote Pay Android? RemoteDeviceConnector only works with native tethering. If not, can you confirm the version of USB Pay Display and can you also confirm that you can view order details from the Clover Register app?

5 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sukhbir Singh avatar image Sukhbir Singh commented ·

Hi @,

Thanks for the response.

I don't want to use the USB pay display application in our scenario. I have an application in which two activities are there, one will work at the merchant's end to enter the amount and another will work on the customer's end to visible that amount. That application will install on both tethered devices. Now we are able to achieve it with the RemoteDeviceConnector, but RemoteDeviceConnector is connecting only when the USB Pay display application opens. I want that RemoteDeviceConnector should be connected without open the USB pay display application. Please suggest.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ Sukhbir Singh commented ·

USB Pay Display is required in order to use custom activities with RemoteDeviceConnector.

0 Likes 0 ·
Sukhbir Singh avatar image Sukhbir Singh David Marginian ♦♦ commented ·

OK, so without using USB Pay Display, it is not possible. Correct? If I am wrong then please suggest an alternative for the same purpose.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community