Improvements to Clover Android SDK - September 6th, 2018

At Clover, we are always looking to innovate both at the hardware and service levels for third-party developers and merchants.

To provide developers with a future-proof method of building apps across both current and future Clover devices, we are introducing the com.clover.sdk.util.Platform2 class in Clover Android SDK v213. This new class is a partial replacement for the com.clover.sdk.util.Platform class, which is being deprecated.



The new Platform2 class is a partial replacement because we will deprecate the older Platform class by June 2019. Until that time, both the Platform2 and Platform classes will be available with Clover Android SDK.

Here are the key highlights of the new Platform2 class:

Building device-agnostic apps

In the older Platform class, using functions such as isCloverMini() and isCloverFlex() requires developers to write redundant code for building apps across different Clover devices.

In another scenario, Clover Station 2018 can stay alive for a limited time on a battery pack even without abilities such as printing and having an active ethernet connection. Here, decisions based on battery information from Feature.BATTERY can be problematic.

With the new Platform2 class, we are helping developers to build their solutions in a more device-agnostic manner. Instead of using device-specific functions, developers can simply use Android functions to check for compatible features and dimensions. For instance, here are three sample checks at the Android level:

FeatureAndroid Level Check
Screen sizeandroid.content.res.Configuration#screenLayout

API levelandroid.os.Build.VERSION#SDK_INT
Battery levelandroid.os.PowerManager

Enabling plug and play across devices

With the older Platform class, developers are required to recompile their apps for each Clover device. The new Platform2 class removes this requirement. In many cases, the new class is a drop-in replacement class for the Platform class.

The Android Device Compatibility Overview is a great resource for more information about checking for features compatibility across different Clover devices.



Even though we are continuously improving the compatibility of Clover devices with Android functions, since these devices do not use the Google Play Store, Google API, or Google services, they are not compliant with Android Compatibility Test Suite (CTS).

For questions and feedback, use

To receive more 3rd party developers communication from Clover, sign up here.