Android Apps

NOTE

If this is your first time building an Android app for Clover, you can try our Android App Tutorial first.

Download the Clover APKs

Using either an Android emulator or an Android device, install Clover Services and add a Clover account. You can find Clover Services at Development APKs.

A step-by-step video tutorial about setting up your Android device for development purposes can be found here.

Download and install Clover and App Updater onto your Android device. Then, navigate to your device’s settings menu, and select Add Account. Select Clover from the list, and then log in using the Clover Developer account that you just created. Your device will then prompt you to install the latest Clover system apps. When prompted to pick a home app, select the Clover launcher.

getting-started-4

Afterwards, visit the App Market to download additional apps such as Inventory and Tables.

Create your Clover App on the Developer Dashboard

On the Developer Dashboard, click your developer name in the top right of the screen to display all the merchants associated with your account and create additional merchants. This is also how you switch between test merchant accounts.

getting-started-5

Near the top of the main developer page, you will see see a green button that says Create New App. Click this button to begin creating a Clover app. Enter your app’s name, and click the Create button to create the app and continue to the Edit App page.

IMPORTANT

Once your app is created on the developer dashboard and has been added by any merchant account(s), including your own test merchant accounts, it is no longer possible to delete that app.

Selection_690

Upload Your First APK

Before you can test your app, you must upload an APK to install on your test device. First, expand the App Type > Android app for Clover devices heading on the Edit App page. The package name of your app will be set by the first APK you upload. This is the same as the package attribute in your AndroidManifest.xml.

IMPORTANT

Once you upload an APK, your app’s package name cannot be changed. Check the package attribute in your manifest file carefully before uploading your first APK.

Selection_688

Next, click the Manage APKs button to visit the page where you can upload new versions of your app.

IMPORTANT

Make sure your APK meets the following requirements before attempting to upload it:

  • The package name does not begin with com.clover. (this indicates an app owned by Clover)
  • The android:minSdkVersion attribute in your AndroidManifest.xml has a value of 17 or less
  • The android:versionCode attribute in your AndroidManifest.xml is greater than the version code of any APK you’ve already uploaded
  • The APK is signed with the same key you used to sign the first APK you uploaded
  • The APK is signed in release mode
  • The APK is signed with only the V1 signature scheme (Jar Signature). The V2 signature scheme is not supported.
  • The signature file is saved as META-INF/CERT.RSA
  • The size of the APK file does not exceed 50 MB

Keep your keystore and private key in a safe and secure place, and make sure to back them up. If you create an Android app on Clover and then lose the key you used to sign its initial APK, you will not be able to upload any new versions of your app, since you must always sign all versions of your app with the same key.

NOTE

If you are using the Generate Signed APK Wizard in Android Studio to sign your app, the signature file will automatically be saved as META-INF/CERT.RSA. If you are signing your app manually, make sure to use cert as the value for the  -alias argument to the keytool command when generating your private key. The alias_name argument to the jarsigner command must use the same value.

Select Choose File, and locate the APK you wish to upload. Finally, click the Upload New APK button to upload the APK as a version of your app.

Selection_689

You can install/reinstall your app on your test device once your APK is uploaded, and all of the app’s permissions will be set. You may sideload over your app from this point on, and the permissions will remain intact. Note that any app with an uploaded APK must have the APK approved by Clover before it can be published.

Edit any Relevant App Settings

From the Edit App page, you will also be able to upload an icon for your app, set the permissions related to merchant data and/or services, declare your privacy policy, and more. Declare the permissions you need here; this will set the Clover APIs your app is authorized to use.

Add Pricing Options

An app requires at least one pricing option before merchants, including your own test merchants, can install and launch the app. From the Developer Dashboard, click on the Edit Pricing link to launch and complete this step.

Sideload your APK

Simply use adb install to sideload your APK onto your development device. You can now use any of the Clover Services or use the access token from the Account Authenticator to make Web API requests.

Test the Debug Version of your App

When you’ve finished developing your app, you can test the app via the App Market. Click the link App Market Preview.

NOTE

Only merchant accounts that were created with your developer account will be able to see your app in the App Market without it first being published.

getting-started-12

getting-started-8

Select your app, and then click Install App. Note that any permissions you have set are shown here for the merchant to accept, as well as any subscription levels. Your app will now be able to access this merchant’s data, as well as recieve their subscription information.