clover-android-sdk
The Clover SDK for Android facilitates development of applications running on Clover devices, see below for more information about the functionality provided by this SDK.
Permissions
Most APIs offered by this SDK require the calling application hold relevant permissions such as ORDERS_W
, CUSTOMER_R
, etc. Method documentation references required permissions. Calls made by applications not holding the required permission will fail with an error. Applications must be submitted to Clover and installed to the merchant for permissions to be granted. Check the Clover developer docs for details on app permissions..
Service Interfaces
Interfaces to use with bound Clover services that allow management of a merchant's data: orders, inventory, customers, employees, printers, properties, etc. Service classes starting with I
are the underlying AIDL interfaces. Clover provides corresponding ServiceConnector
classes for simpler usage.
For more information about binding to services, refer to the Android documentation: Bound Services.
Intents
Intents are used to send and receive broadcast messages in Android as well as start activities and services. The com.clover.sdk.v1.Intents class has definitions for most commonly used intents for broadcasts sent by Clover and starting Clover activities.
Clover Device Interfaces
Clover devices offer additional functionality beyond standard Android, such as:
Provider Contracts
Searching for and displaying large amounts of data is best done through a content provider. Inserting, updating and deleting Clover data objects via content provider is generally not supported.
A common pattern for applications to listen for provider data changes is to register a ContentObserver
via the relevant contract URI. See com.clover.android.sdk.examples.PrintJobsTestActivity for an example.
For more information about content providers, refer to the Android documentation: Content Provider Basics.
Clover Data Objects
The v1 data objects and associated interfaces tend to conform to the deprecated Clover v1 and v2 web REST API, the v3 objects and associated interfaces tend to conform to the Clover v3 web REST API. Changes to Clover data objects must be sent to the appropriate service interface to take effect.
Clover data objects offer interfaces to convert to and from JSON as well as being Parcelable.
For complete examples and more information about Clover development please visit the Clover development website.