question

rizwan avatar image
rizwan asked Jacob Abrams answered

Clover Mini Usb Communication with Android Device

The requirement is to communicate Clover Mini with android tablet. Directly ( Plug Data cable one end into clover USB port and other end to android tablet charger jack ) clover Acts as a USB host and Android tablet work as a Accessory. I am able to find the USB Device, verify the VID/PID, get permission, open the connection, get the interface, claim the interface, and get the endpoints. But when I attempt to send data using the following code:connection.bulkTransfer(endpoint, dataArray, dataArray.length, USB_TIMEOUT);

it returns -1

Following are the components i am using

connection => UsbDeviceConnection,
endpoint => UsbEndpoint (out),
data Array => byte[]
USB_TIMEOUT => 1000
App Does not crashes, it also does not Print any log etc.
below is the stackoverflow link where i have posted question with attachment of required model

https://stackoverflow.com/questions/45420374/usb-c...

i have contacted support they dont have any example to which they can point me. so i need community help to get me actual implementation

i
f any one work on it please assist me

any help would be highly appreciated
Clover Android SDKClover Mini
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

Jacob Abrams avatar image
Jacob Abrams answered
Have you seen this project: https://github.com/clover/remote-pay-android

Please review that projects readme, build the app and run it on your Android tablet with the Clover device connected as a peripheral. You will likely need a USB OTG connector for your Android tablet to make the connection. You can test the OTG connector by attaching a USB mouse or keyboard to your tablet.

You can find the source code in the GitHub project uses AOA to communicate with Clover devices.

https://source.android.com/devices/accessories/protocol
10 |2000

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