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

2

7

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

Kitchens answered 28/10, 2021 at 15:51 Comment(4)
Does any other app on the device have control of the scanner? That is the most common cause of this error. It is also worth noting that the EMDK is not validated in the work profile of the MC3300Eutherian
@DarrynCampbell, Thanks for the response. Yes there are couple of app have control but they were not active at that time (I mean not opened). Please can you give more details for understanding the validation thing with work profile. Because we have a customer to support this feature. We need to find an alternative atleast. ThanksKitchens
I can't remember off the top of my head whether work profile is supported on MC33. I suggest you contact Zebra support for clarification as the device may require an OS update.Eutherian
Okay Thanks I will check with zebra support.Kitchens
E
11

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>
Eutherian answered 31/1, 2022 at 7:49 Comment(1)
This fixed it for me. We had several TC21s. The ones on older versions of Android worked ok, but ones on Android 11 were bust until we added the above line.Veinule
V
0

In your manifest

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

<queries>
    <package android:name="com.symbol.emdk.emdkservice" />
</queries>
Vola answered 15/11, 2023 at 12:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.