question

sonu avatar image
sonu asked katenelson092 commented

we have clover station device api level 17 we implementated cash drawer funtinallity but not working.

This is my cash drawer code (API Level 17 model C100):

added dependancy we getting crash when runing application:


android:name="clover.permission.POP_CASH_DRAWER_NEW"
public void onOpenCashDrawerClick() {
    Context appCt = getApplicationContext();
    CashDrawers cds = new CashDrawers(appCt);
    Log.i("onOpenCashDrawerClick", String.valueOf(cds.list().size()));

    for (int i = 0; i <  cds.list().size(); i++)
    {
        Log.i("inside1for",String.valueOf(i));
        cds.list().iterator().next().pop();
    }

    Set<CashDrawer> drawers = new CashDrawers(appCt).list(); // get the set of connected cash drawers
    for (CashDrawer cd : drawers) {
        Log.i("inside2for", String.valueOf(cd.getDrawerNumber()));
        cd.pop(); // pop each connected cash drawer
    }
Clover Station
3 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.

katenelson092 avatar image katenelson092 commented ·

Can we upgrade the current version?

word finder

0 Likes 0 ·
sonu avatar image sonu katenelson092 commented ·

Hi Katenelson,

Thanks for your response.

We checked It is alredy updated version please suggest us .cash drawer this API level working or not for clover station (API level 17 ) rest of the details mention above.

Thanks in advance.

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·
It's help if you could include the logs.
-1 Like -1 ·

1 Answer

·
Jeffrey Blattman avatar image
Jeffrey Blattman answered sonu commented

What version of the SDK are you using? That permission has not been required since a ~2018 release.

Can you try upgrading?

3 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.

sonu avatar image sonu commented ·

Hi Jeffrey,

Thanks for your response.

We are using SDK version 17 with clover. Is it possible to use cash drawer with that version of clover device. Please suggest on this.

Thanks in advance.

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ sonu commented ·

Jeff is asking about the version of the clover-android-sdk not the Android OS SDK version. If you see here https://search.maven.org/artifact/com.clover.sdk/clover-android-sdk and on github https://github.com/clover/clover-android-sdk/releases you can see that the clover-android-sdk has release numbers such as 293, 292, 288, etc.

0 Likes 0 ·
sonu avatar image sonu Jacob Abrams ♦♦ commented ·

Hi Jacob,

Thanks for your response.

We are using below mention clover SDK but nothing happen with the above code

implementation 'com.clover.sdk:clover-android-sdk:228.3'
implementation 'com.clover.sdk:clover-android-connector-sdk:191.4'

Note: Also we have tried to open cash drawer through the register applcation via open drawer option but nothing happen with it.

So please suggest do we need to perform anything to open cash drawer.

Thanks in advance.

0 Likes 0 ·

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