How to create DataWedge profile programatically

B Branislav Malovec 3 years 7 months ago
15 3 0

Our company develops enterprise solution where scanning is important part of a process. We consider Motorola TC55 as good option for our users but have to integrate scanning into our app. Use case is following : User will trigger scanning from within our application, we broadcast Intent for DataWedge and then wait for response. As I understood there must be a Profile created in DataWedge for our application. Is it possible to create it programatically? Manual creation of profile is not an option for us as far as our typical customer may have 100s - 1000s users and we can't ask them all to create profile. I also have read about autoimport of configuration file that could be a way but then our application must contain configuration file and deploy it to DataWedge folder. Is this recommeded solution?
 
Thanks for help!

Please Register or Login to post a reply

3 Replies

B Bruce Tonkin

I have created a scanning app for the TC55 that relies on the DataWedge and a DataWedge profile. I also ran up against this issue because we will potentially distribute our app on hundreds of devices and cannot expect users to create a DataWedge profile, let alone correctly.

I resorted to writing the DataWedge profile file to the autoimport folder on app startup. I did it every time the app starts to decrease the chances users meddling with DataWedge profiles will impact my app. I am storing the profile file (which is just a SQLite database file) as a Android resource in my app.

Contrary to other replies, I did not have to write all the DataWedge profiles to the autoimport folder, only the profile file for my app. Also, DataWedge automatically and quickly picks up the profile file - I didn't have to poke it to do so.

I also wish there were an API to manage DataWedge profiles - it would be more efficient and flexible than storing a whole profile file. One possibility is to create the profile file in memory using the SQLite library and then write it to the autoimport folder - but you would be exposed to changes in the structure of the profile file by Motorola.

F Fernando Pardo

Hi  , were you able to programatically change settings in DataWedge profile? thanks.

K Koehler KEN

The TC55 Integrators Guide implies it is the recommended solution. I too am here seeking a better solution.
I am gaining experience (trial by fire?) on an MC40.
One thing the guide does not make clear about the autoimport is that it only consumes the file created by "export all", not individual profiles. If you plan to use autoimport as I do, you have to be sure you have the golden/only set of profiles for the whole device. The last one to import wins.
I have not found a programmatic way to update profiles yet. We will be distributing the config file via MobiControl management software. I've read where others have coded their app to copy a predefined config file to the autoimport directory (see guide for location). I have not yet found a way to notify DataWedge of the new file. So far I've had to resort to soft resetting the device. There has to be a better way.
A developer I work with is having success with the Intent you mention above. He disables typed output and sets up his code for the Intent broadcast.

TC55 resources:

TC55 Integrators Guide specifically:
https://atgsupportcentral.motorolasolutions.com/content/emb/docs/manual…

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