question

resicons avatar image
resicons asked resicons commented

always no cash drawers found

Hi there,

I am developing an application that uses the cash drawer.

I am using a clover mini dev kit and connect it to a cash drawer via clover hub. Using Register app, the Open Cash Drawer function worked perfectly, I can open it.

To implement in code, I have looked here: https://clover.github.io/clover-android-sdk/com/clover/sdk/cashdrawer/package-summary.html and here https://github.com/clover/android-examples/tree/master/cashdrawerexample.

However, when I build and test the code on the second link, it doesn't work, the screen always displays "No connected cash drawers". new CashDrawers (MainActivity.this).list() always returns empty.

Where did I go wrong? Any help would appreciated

Clover Android SDKClover MiniSandboxDevKit
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 resicons commented

The code in android-examples appears to be rotting. It looks like it refers to a very outdated version of the clover-android-sdk. Notice in build.gradle the following line:

compile 'com.clover.sdk:clover-android-sdk:191.6'

You should increase that to a more recent version and try again. You may see the most recently published version here: https://search.maven.org/artifact/com.clover.sdk/clover-android-sdk

There is also an update coming to the cash drawer API in clover-android-sdk in the next few weeks that should allow it to work properly on Clover Station Pro.

1 comment
10 |2000

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

resicons avatar image resicons commented ·

you're the man!

0 Likes 0 ·

Welcome to the
Clover Developer Community