Sideload an APK
You need to install your app to the sandbox text merchant on the Developer Dashboard so that it can use Clover services such as OrderConnector
in the Clover Android SDK.
When you install your app on your test merchant, your device downloads and installs your APK. The device also downloads metadata about your app so that the app can use additional Clover services. If you attempt to sideload a development version of your APK on top of the downloaded app, it will fail with the following message:
$ adb install -r test.apk
1 file pushed. 6.4 MB/s (887871 bytes in 0.132s)
pkg: /data/local/tmp/test.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
Your attempt to sideload fails even if you are signing your APK with the same certificate that you used to sign the APK that is uploaded to your sandbox Developer Dashboard. This is because Clover adds additional signatures to your APK in the sandbox. While your certificate proves you authored the app, the second certificate is used to prove additionally that the app came from the Clover App Market. Because your app is double-signed when you download it from the Clover App Market, its certificates don't match what you signed locally in your development environment.
Troubleshoot app sideloading certificate issue
Follow these steps to workaround the certificate problem in the app development phase:
- Make sure your app is already installed and downloaded from the Clover App Market.
- Manually uninstall the Clover App Market double-signed APK from the device using the
adb uninstall
command.
$ adb uninstall com.example.test
Success
- Manually install your developer single-signed APK using
adb
. Make sure that the version code in your sideloaded app is higher than the version code in the app that you uploaded to your Developer Dashboard. Using a lower version code makes the Clover App Updater think that the APK must be upgraded. The Clover App Updates tries to download and overwrite the previous APK.
$ adb install -r test.apk
1 file pushed. 6.4 MB/s (887871 bytes in 0.133s)
pkg: /data/local/tmp/test.apk
Success
- If you make changes to permissions for your app on the Developer Dashboard, you can manually sync the device by tapping the Sync button on the Clover Dev Kit.
Updated 4 months ago