Conflict when Multiple APK's using the EMDK

B Brock Davis 2 years 11 months ago
3 4 0

I have developed multiple applications that utilize the EMDK for various features.   Running the applications standalone works fine.  If I start one application, then launch a second EMDK enabled application, the first application fails when using the EMDK features.
 
Typical error response from EMDK is
 
Extended Status message is : One or more names of parameters not found in extraData.
 
Status String is:

 
It is almost as if the EMDK Service is loading one Asset Profile at a time, or getting confused as to which profile to use.
 
Is the EMDK single use?
 
Is there someway to flush out the EMDK Service to allow the application in the foreground to have it's profile loaded?
 
Suggestions?

Please register or login to post a reply

4 Replies

B Brock Davis

Bill,

More information:  I built and tested multiple EMDK sample applications, no problems.  Switching back/forth between applications, no problems.  But all the examples appear to supply the XML data within the processProfile method, like:
    profileManager.processProfile(_profileName,  ProfileManager.PROFILE_FLAG.SET,  profileArgs);

The difference between the sample applications and my application:

1. The Sample Application builds the  XML and sends to EMDK.  My application is depending on EMDK pulling profile from EMDKConfig.xml

2.  Within my Application is a launcher (not sure if it matters).

I will reboot the device, my application/launcher starts.  EMDK profiles are set.
I start one of the Sample applications, it works.
I go back to my application and attempt something that invokes EMDK, those features fail.

C Charitha Mallawaarachchi

Hi Brock,

Could you please change the code to get profile manager object when you need it and do the job, and release it. This will allow the apps to use their own config files. Same this should implement in both apps.

Steps:
=====

Get EMDK Manager Object in onCreate
.....
Get Profile Manager object when needed, push the profile, release profile manager.
....
Release EMDK Manager in onDestory.

Otherwise accessing EMDK APIs from different threads/ apps simultaneously is not allowed.

Thanks,
Charith.

V Vedsatx Saddvv

Hello Brock, How are you handling the EMDK objects in the lifecycle methods of your Activties? 

B Brock Davis

Bill,

Typically within the onCreate of the Main Activity I create an object to hold the EMDK objects.  The on the OnDestroy I clean up.  There is nothing within the OnResume/OnStop.

Reviewing a clients application, same setup, create EMDK objects within the OnCreate, clean up in the OnDestroy.

CONTACT
Can’t find what you’re looking for?