Clover Android SDK v262.2 Release Notes

We have recently released version 262.2 of Clover Android SDK.

clover-android-sdk

Data model changes

  • AdditionalChargeAmount - added the rate field and associated methods
  • AdditionalChargeType - added CONVENIENCE_FEE, CREDIT_SURCHARGE, and INTERAC_V2 charge types. The INTERAC type is deprecated.
  • Added the IdArray class
  • DisplayOrder - added the isVat field and associated methods
  • Payment - added the DISCOUNT and OFFLINE_RETRYING result statuses
  • PrintState - added PRINTING state
  • VoidedLineItem - added the approvedBy field and associated methods

New features

  • When working with an order, apps can create and display manager overrides for voided line items using the new approvedBy field.
  • Information about merchant-set additional charges on a credit transaction can be accessed using AdditionalChargeAmount.getRate. Apps displaying transaction details or printing custom receipts will need to be updated to show any fees (returned in the additionalCharges of the JSON response).
  • The SDK’s cash drawer APIs were adjusted to make it easier for apps to connect to and use external cash drawers or those built into Clover devices. In the future, this will make it easier and faster for Clover developers to support new models of native and external cash drawers. The updated CashDrawer and CashDrawers classes provide functions for working with Clover-printer-connected and external drawers, respectively.
  • The ACTION_KEYPAD action was added to provide a consistent way to take customer input on Clover devices. The keypad can be one of three types: numeric, email, or phone. See the documentation for complete details.
  • OrderV31Connector now has methods to allow you add line items in bulk: addFixedPriceLineItems, addPerUnitLineItems, and addVariablePriceLineItems.

Deprecations and removals

Additional charges

In AdditionalChargeType, the INTERAC charge type is deprecated and should be replaced with INTERAC_V2.

Cash drawers

Several hardware-specific cash drawer classes are deprecated in favor of the more general CashDrawer and CashDrawers:

  • APG554aCashDrawer
  • MiniPrinterCashDrawer
  • Station2018PrinterCashDrawer
  • StationPrinterCashDrawer

The ACTION_OPEN_CASH_DRAWER_SERVICE action and the v1.printers.CashDrawer class are now deprecated.

EmployeeConnector
  • Usages of the setEmployeePin method should be replaced with updateEmployee
  • Usages of the logout method should be replaced with Lockscreen.lock
Equipment

The Equipment class has been removed from the SDK.

Intents

Usages of the ACTION_MANUAL_PAY and ACTION_MANUAL_REFUND actions should be replaced with ACTION_CLOVER_PAY.

InventoryConnector

The following methods have been deprecated:

  • getItems()
  • getItemsWithCategories()
  • getItemIds()
  • getItems(ServiceConnector.Callback<List<Item>> callback)
  • getItemsWithCategories(ServiceConnector.Callback<List<Item>> callback)
  • getItemIds(ServiceConnector.Callback<List<String>> callback)
Item

Usages of the getStockCount method should be replaced with getItemStock.

ItemStock

Usages of the getStockCount method should be replaced with getQuantity.

Merchant
  • Usages of the getPhoneNumber method should be replaced with Address.getPhoneNumber.
  • Methods associated with merchant equipment have been removed:
    • clearEquipment
    • getEquipment
    • hasEquipment
    • isNotEmptyEquipment
    • isNotNullEquipment
    • setEquipment
OrderV3Connector

Usages of OrderV3Connector should be replaced with OrderV31Connector.

OrderV31Connector

Usages of the deleteLineItemsWithReason method should be replaced with deleteLineItems2.

Platform

The previously deprecated Platform class has been removed from the SDK.

Service charges

Usages of the ServiceCharge.getPercentage method should be replaced with ServiceCharge.getPercentageDecimal.

clover-android-sdk-examples

The following samples have been created or updated for v262.2:

  • Added a new Cash Drawers Test example showing how to use the SDK to work with built-in and external cash drawers
  • Added a new Keypad Test example showing the usage of the new keypad intent
  • Fixed a bug in the Print Task example that would cause the app to crash