question

matthewpalsich avatar image
matthewpalsich asked ·

Cannot Read Employees

I am unable to read employees on my emulated Clover device from the Clover API using an EmployeeConnector.

I have uploaded my APK to the Clover sandbox with the same package name I'm using during development. I have enabled the permission to read employees within my application's Clover settings. I have downloaded the application to my emulator using the Clover Marketplace which should have synchronized the permissions. My APK meets all requirements described here aside from being a production APK; I develop using a build variant with a ".debug" application Id suffix. However, I do not see a non-production APK being an issue in a non-production sandbox.

Then, as guided by Clover, I sideload my build with the same packaged name onto the emulator. Still, when calling EmployeeConnector::getEmployee(EmployeeCallback<Employee>), I receive the service failure status "FORBIDDEN" with the message "App doesn't have required permission: <package_name> does not have permission EMPLOYEES_R".

Any assistance resolving this issue is appreciated.
Thank you.
App MarketSandboxClover Android SDKEmployees
2 comments
10 |2000 characters needed characters left characters exceeded

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

How are you sideloading your APK?

Can you try the steps outlined here: https://community.clover.com/articles/10448/how-to-sideload-an-apk-onto-clover-devices-for-dev.html

0 Likes 0 · ·

Hi @Chanel,


I've uninstalled and reinstalled the APK via the Marketplace, and I've manually uninstalled the APK using adb. At this point, I am attempting to install the APK via Debug in Android Studio and do not receive the inconsistent certificate error implying the metadata from Clover has been maintained. I have previously followed those steps precisely and the singly-signed APK installs without error, but I need to be able to Run and Debug from Android Studio during development.

After installing the APK via Android Studio, even though the meta data should still be there, I again receive the FORBIDDEN permission error. The permission is still enabled for the application.

0 Likes 0 · ·
Chanel avatar image
Chanel answered ·

Sorry, but I'm unable to find any inconsistencies on our end. Unfortunately, I'll have to ask you to try again:

1. Uninstall the app through App Market
2. Install from the App Market (this should ensure that the permissions from Clover are there). Run the app to ensure that the permissions are correct.
3. "adb uninstall" your app. Then "adb install" it. This should be done before the device can resync and download the apk that Clover has.
4. Running your app at this point should run with the permissions that Clover has for you.

Share
10 |2000 characters needed characters left characters exceeded

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

Danielle Cox avatar image
Danielle Cox answered ·
FYI - I get this on my "station" emulator but not the mini or later versions. (I have tried Station 2018)
Share
10 |2000 characters needed characters left characters exceeded

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