Failed to access dependency component - EMDK barcode - Android Work profile - Xamarin

1.4k Views Asked by At

We are developing an android application with barcode scanning feature. We are using EMDK for barcode scanning. Our application runs in Zebra Mobile handheld (MC33).

We are currently facing an issue were the barcode triggering is not happening in the app when it is running in a Work profile (https://support.google.com/work/android/answer/6191949?hl=en) But it is working in non-work profile properly. We tried to troubleshoot the issue and found out that the below code

EMDKResults results = EMDKManager.GetEMDKManager(Application.Context, this);

is returning FAILURE and the ExtendedStatusMessage is "Failed to access dependent component."

We were unable to proceed after this. Please help us how to fix this issue.

Note: this is only happening when the app is running in Android work profile

2

There are 2 best solutions below

1
Darryn Campbell On

A similar question was asked at How to use Zebra EMDK in release build? and copying that answer here:

Please add the following to your manifest under the uses-permission tag:

<queries>
  <package android:name="com.symbol.emdk.emdkservice" />
</queries>
0
paakjis On

In your manifest

<uses-permission android:name="com.symbol.emdk.permission.EMDK"/>

<queries>
    <package android:name="com.symbol.emdk.emdkservice" />
</queries>