question

Lee Tickett avatar image
Lee Tickett asked Lee Tickett answered

Deploy App on Android 5+ Clover SDK Permission Issue clover.permission.POP_CASH_DRAWER

I was trying to install/launch one of our Clover apps on my mobile and receiving an error about duplicate permission;

clover.permission.POPCASHDRAWER

The implication/suggestion was that the app was already installed and uninstalling would resolve, but this wasn't the case.

The odd thing is that our app doesn't use/need/declare this permission. After searching I found a reference in a manifest in one of the build/intermediate folders (but removing this reference was futile as the files are generated during build).

Eventually I managed to workaround the issue by modifying AndroidManifest.xml (removing the permission);

<permission
    android:name="clover.permission.POP_CASH_DRAWER"
    android:protectionLevel="normal" />

...from my clover sdk cache; C:\Users\lee.gradle\caches\modules-2\files-2.1\com.clover.sdk\clover-android-sdk\152.9\ba10956e7ab0f2f2cdd31cfa3b4cbf4b5953d7f5\clover-android-sdk-152.9.aar (i renamed the file to .zip modified the file then renamed it back to .aar)

Was there a better solution and/or is this something that clover need to put a "real" fix in place for in a future sdk?

Thanks

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lee Tickett avatar image
Lee Tickett answered
Just received an e-mail from Clover to confirm this is in the pipeline (only took 14months ;)

POP_CASH_DRAWER_NEW Permission
Android 5.1 (API level 22) onwards, apps with different signatures cannot define the same permission.
On Clover Station (2018) and Clover Flex, this Android update creates an issue where if two differently-signed apps define the same POP_CASH_DRAWER permission, the second app cannot be installed successfully.
To address this issue, we are introducing the POP_CASH_DRAWER_NEW permission in the Clover engine app. To use this new permission in your app, simply remove the old POP_CASH_DRAWER permission from your app’s AndroidManifest.xml file and replace it with:
<uses-permission android="clover.permission.POP_CASH_DRAWER_NEW"/>
Once you make your changes:
  1. Test your changes in your Clover Sandbox environment.
  2. Submit your new APK for approval to be used in the production environment.
  3. Do not set your new APK version as default before the updated Clover engine app is available for merchants.
NOTE: We will send out a follow-up email for when the updated Clover engine app is available for merchants.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jackh avatar image
jackh answered

Hello all,

I found the solution posted by tickett solved the same problem I was having trying to install a Clover app on various test devices whereby an INSTALLFAILEDDUPLICATEPERMISSION error was being thrown related to the clover.permission.POPCASH_DRAWER permission.

I did this by renaming the clover-android-sdk-152.9.aar folder with a .zip extension, going into the .zip file (not extracting), moving out the AndroidManifest.xml to a temporary folder and making the changes there, then moving it back into the .zip file before renaming it back to .aar.

This seemed to solve the problem but as this is a temporary workaround it would be great if Clover could investigate this and come up with a more permanent workaround?

Cheers

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community