question

Shubham Bhawsar avatar image
Shubham Bhawsar asked Shubham Bhawsar published

Clover CFP SDK's RemoteDeviceConnector uses not working in Clover_C500 device

We are using Clover customer-facing-platform SDK's RemoteDeviceConnector to start custom activity in customer facing device,

But it is throwing java.net.ConnectException: Connection refused Exception as system error in device logs and device is freezes

Dependency

implementation 'com.clover.cfp:clover-cfp-sdk:4.2.1'

Code we used to start custom activity

Account account = CloverAccount.getAccount(this);
RemoteDeviceConnector remoteDeviceConnector = new RemoteDeviceConnector(this, account);
CustomActivityRequest car = new CustomActivityRequest(CUSTOM_ACTIVITY_NAME, null );
executor.execute(() -> {
   remoteDeviceConnector.resetDevice(new ResetDeviceRequest());
   remoteDeviceConnector.startCustomActivity(car, new CustomActivityListener() {
     @Override
     public void onMessageFromActivity(MessageFromActivity message) {
       if (message == null || message.payload == null) return;
     }
     @Override
     public void onCustomActivityResult(CustomActivityResponse response) {
       if (response == null || response.payload == null) return;
       if (response.payload.equals(getString(R.string.skip))) {
         loyaltySharedPreferences.setLoyaltyNumber(getString(R.string.skip));
       } else if (!response.payload.equals(getString(R.string.finish))) {
         submit(response.payload);
       }
     }
   });
});

Device logs:

1673027252980.png

clover developer community
10 |2000

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

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community