getEMDKManager method - EMDKManager object request fails

I'm following this tutorial on a TC56DJ device and i'm trying to initialize the scanner. getEMDKManager method always returns "NONE" as statusCode and the app crashes in onOpened (at getInstance).

I've also tried barcodesample1 as is with the same result

 

Here is my code in onCreate,

 

EMDKResults results = EMDKManager.getEMDKManager(getApplicationContext(), this);

 

if (results.statusCode != EMDKResults.STATUS_CODE.SUCCESS) {

 

  System.out.println(""EMDKManager object request failed!"+ results.statusCode);  // Prints NONE

 

}

and here is my onOpened,

 

@Override
public void onOpened(EMDKManager emdkManager) {

 

  this.emdkManager = emdkManager;

  emdkManager.getInstance(EMDKManager.FEATURE_TYPE.BARCODE);

 

}

The log.

 

A/art: art/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc:923] Check failed: called != nullptr int java.lang.Enum.ordinal() com.symbol.emdk.EMDKManager$FEATURE_TYPE[] virtual 15

A/art: art/runtime/barrier.cc:90] Check failed: count_ == 0 (count_=-1, 0=0) Attempted to destroy barrier with non zero count

A/art: art/runtime/runtime.cc:366] Runtime aborting --- recursively, so no thread-specific detail!

A/art: art/runtime/runtime.cc:366]

A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 3877 (x.myapplication)

Any hints?

Anonymous (not verified)
That sounds very strange,

That sounds very strange, NONE is the default value for the status so it is almost as if EMDK does not exist on that device.  TC56 is obviously the very latest device so EMDK should be pre-installed but you could try updating the device runtime, if you are on Windows it should be on your hard drive at "C:\Program Files (x86)\Symbol EMDK for Android\v6.0\Device Runtime Deployment"

It is not an issue I have seen before but I do not have a TC56 device to try to reproduce.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Tasos Grigoris
Thanks for your response.I'm

Thanks for your response.I'm using EMDK 6.3.I run the update (.apk file) on the TC56 but i got the following error,

"Error: The EMDK update is not sopported on this device".

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
I suspect that error means

I suspect that error means that you are not supposed to update the EMDK on that device because it should come pre-loaded.  EMDK 6 DOES support TC56 according to the release notes.  The other thing I would suggest would be to update the device to the latest firmware but nothing has been released yet - other than that then perhaps a factory reset?

Hopefully somebody else can provide some insight who has run EMDK on TC56

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Thanks Darryn, yes that's

Thanks Darryn, yes that's correct, the EMDK os update tool restricts update for that device, an EMDK update will only available to that device in the form of a BSP update.

EMDK for Android v6.3 Release Notes Support | Zebra

I also do not have one of those devices to test with, so I can't confirm the issue.

Tasos, If you go to Settings on your TC56 what version number is listed for the EMDK service?

Settings > Apps > All(tab) > EMDK Service

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Tasos Grigoris
The EMDK Service version is 6

The EMDK Service version is 6.3.20.620

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Hi Tasos,a couple of

Hi Tasos,

a couple of questions for you.

  • What BSP version have you on your device (settings->about phone-> build number)?
  • can you copy and past here (or attach) your build.gradle file?

Thanks

~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
So yes the EMDK is installed

So yes the EMDK is installed and what you are trying to do should work as expected.

Can you please try to run this sample app and see if you see the same issue?

Barcode APIs - Zebra Technologies Techdocs

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Tasos Grigoris
Thanks for your responses

Thanks for your responses.Apparently i was using an older sample.I downloaded the one Bill suggested and it runs fine.

Still when i use any of the tree jars from 'Symbol EMDK for Android' (v19, v22, v23) folder i get NONE as status code.I've added the two lines for permissions on my manifest,

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

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Tasos Grigoris
Could this problem be related

Could this problem be related with some setting of DataWedge app?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
I'm not sure if it is the

I'm not sure if it is the root cause but you have compile files('lib/libs/com.symbol.emdk.jar') in your gradle copied above.  You cannot compile the jar file in as it doesn't contain any implementation, you need to specify the jar as provided as detailed here: EMDK for Android Programming Practices - Zebra Technologies Techdocs .  Compiling the jar will lead to runtime exceptions rather than build errors.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Tasos Grigoris
It finally worked.Thanks

It finally worked.Thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vijay Harikrishna
@Tasos Please consider

@Tasos Please consider accepting this answer and mark ur question as answered so that it will help the community.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vijay Harikrishna
This is very useful. I wish

This is very useful. I wish this gradle dependency was specified somewhere in the sample project or other training material on EMDK much more explicitly. Thanks.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Victor Sanchez
I have the same problem and

I have the same problem and the sample posted here is not working.

Version of EMDK Service is 6.6.14.914 and BSP is 01-21-04.1-MG-00-UPDATE005 release-keys

What can I do?

Thanks in advance.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Christopher Bogacz
I have the same problem. The

I have the same problem. The only difference is that the application works just fine when I upload it using the Android Studio. If I build the apk, transfer it to device or distribute it using the Google Play, the application returns value NONE in results.statusCode. I tried to update the EMDK on the device. Also I updated EMDK on the computer. Tried installing on different Zebra Devices. By the way we use TC700H. Nothing helped. Please, advise what might be wrong or what I am missing. Thank you.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Christopher Bogacz
I figured out. I had

I figured out. I had implemented EMDK two times in the project using different methods and using different EMDK versions.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anton Mueller
I've got the same problem.

I've got the same problem. How did you solved it again? I couldn't find different methods.

I've implemented EMDK 7.0.0, the EMDK Service version is 6.5.12.812.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Wolfgang Hege
Hi Anton,I had the same

Hi Anton,

I had the same problem here today on a TC75. The application worked fine, when started from AndroidStudio with USB Debugging, but crashed when it was installed from an apk and then launched on the device.

I could solve the problem as described in the document 'EMDK for Android Programming Practices .. ' mentioned above:

Old setting in gradle.build, that failed:

implementation fileTree(include: ['*.jar'], dir: 'libs')

New settings that solved the issue:

provided fileTree(include: ['com.symbol.emdk.jar'], dir: 'libs')

compile fileTree(exclude: ['com.symbol.emdk.jar'], dir: 'libs')

Hope this helps.

Wolfgang

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments