Packaging DataWedge Profile with Application

M Mary Bascome 3 years 6 months ago
6 4 0

I am currently working with the TC55 and specifically looking to utilize the DataCapture APIs for working with the Imager.  Once I have a datawedge profile defined for my application, I understand that it is possible to export it and then either manually import it or use the autoimport directory to get it to other devices.  Or, if my clients are using MSP, to use that to distribute the profile.
 
However, I am curious as to whether there is a way to include the profile in my APK and either via an API or via the filesystem to get it to DataWedge?  This would allow me to address a deployment that is not using a deployment platform like MSP and avoids having to have an extra provisioning task on top of installing my APK.
 
Thanks in advance for any help.

Please Register or Login to post a reply

4 Replies

M Mary Bascome

I was able to get the configuration db to autoimport via my own application.  In case it helps anyone else, there was one subtlety to doing this. I found that if I wrote the file out to the autoimport directory as datawedge.db, it would sometimes get picked up and imported, but sometimes only the second time.  The way I found for it to be reliable is to write out the file contents to a temp file in the directory (_datawedge.db for example) and then rename it to the correct file name.  My guess is that perhaps it was trying to be read before it was fully written out from my app.

Anyway, this process appears to result in the config getting imported consistently.  However, I am now having a different problem that perhaps someone can help with.

What I am finding is that after I write the config db out and it gets imported, sometimes the scanner is working immediately as expected, but sometimes it isn't.  By that I mean that the aiming beam is not shown sometimes when pressing the hardware button on the side.  If I restart my application, it appears to work consistently after that, just not consistently the first time.  One other manual way I have found to make it work is to pause my app, go into another app, then resume my app, and then scanning works (i.e. did NOT restart my app in this case).  Ideally, I want this to be seamless, if possible.  My guess here is that since I am copying a config db from my activity WITH a new profile that is tied to my activity, that somehow it is not taking effect immediately.  The pause/resume workaround I mentioned above is probably triggering datawedge to check the active profile and switch to the right one. 

Any help or suggestions are appreciated.

E Efkan YILMAZ

Hi Mary,

here is feedback from dev:

The exported profile database can be included with the application APK and deployed.  Once launched, the application will use the Google APIs to copy the database to the DW auto-import folder.  Motorola does not provide any API for copying the file because Google already provides it. 

M Mary Bascome

Ana,

For the autoimport process, does the db file need to be a fully exported configuration or can it be an individual exported profile also?

M Mary Bascome

Thanks for the response.

Ok, I will look to do that.

I was assuming (incorrectly it seems) initially that my application would not have permission to access that folder via the Google APIs.

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