The tutorial uses the following setup:
- JVM 1.8.0
- Gradle 2.3
- Android Studio 18.104.22.168
To prepare for developing a Clover app, generate a basic APK and register your app with the Clover platform.
- Create a new project in Android Studio. This tutorial uses the Blank Activity template. Set the minimum SDK to 17 and enter a package name. Note that the name of the package cannot begin with
com.clover. Before making any other changes to the app, generate a signed APK of the new project.
When signing your app in Android Studio, make sure your APK is signed with the V1 (Jar Signature) Signature Version only. V2 (Full APK Signature) is not supported. You can find more APK rules in Uploading & Testing APKs.
Before you can sideload your app onto your device for testing, you must upload your APK to the Clover App Market, then download it onto your device. You will only need to do this once. Afterward, you'll be able to sideload new versions of your app onto the device directly.
- Create your app on the Developer Dashboard.
- On the app's Permissions page, add the Merchant and Inventory Read permissions. You will use these permissions for this tutorial.
If you change app permissions after a merchant (including your test merchant) has downloaded it, the new permissions will not take effect for that merchant unless the merchant uninstalls and reinstalls the app.
Add price(s). An app must have at least one pricing option before merchants, including your own test merchants, can install and launch the app. On the Developer Dashboard, click Edit Pricing to launch and complete this step.
Click Settings* and then click Android APKs** to upload your signed APK. Learn more about uploading and testing APKs.
Once you've successfully uploaded the first APK for an app, all future APKs for that app must have the same package name and an incremented
- Open the App Market on your Clover device and locate your app. You will see the status "Not Published" at the top-right corner of the card for the app. Your unpublished app will only be visible to the merchant accounts associated with your developer account.
Install the app.
Launch the app on your device. You should see the default
Hello world!layout. After completing these steps, you will be able to sideload new versions of the app directly onto this device.
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.