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 }