How Datawedge profile add programmatically in xamarin?

We have a mobile application developed for Motorola MC40 devices to scan barcodes by using a DataWedge profile. Currently this DataWedge Profile is created manually. Since this is troublesome, we are in a process of automating the DataWedge profile creation.

For application development we use Xamarin Studio with C#.NET development.

The approach we use is "AutoImport" funactionality in DataWedge application. The mobile application copies "datawedge.db" file (exported and stoed in a known location) to ~/enterprise/device/settings/datawedge/autoimport path during application initialization by using "FileStream Copy" and DataWedge application is supposed to pickup the file automatically and create the relavant profiles.The mobile application copies the file to correct location, but DataWedge application does not import it and create profiles. If the MC40 device is restarted after the file copy, DataWedge detects it and create the profiles. Also if the datawedge.db file is copied manually, DataWedge picks it up immediately and create the profiles.


We also referred to below discussions but could not found the correct approach to solve the issue.

https://developer.motorolasolutions.com/message/15674#15674

https://developer.motorolasolutions.com/message/14371#14371

https://developer.motorolasolutions.com/message/15010#15010


Packaging DataWedge Profile with Application


Re: How to create DataWedge profile programatically


ET1 Datawedge profile add programaticaly ,

 

It is greatly Appreciated if you could provide some insight into this issue.

Bruce Crawford
Randheer, I suggest using the

Randheer, I suggest using the capabilities of the new EMDK for Android  to include a DataWedge barcode configuration with your application.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Randheer Amaranath
Hi Bruce,Base on your

Hi Bruce,

Base on your suggestion we are working on this in xamarin.Thank you very much.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bijoy Jacob
Hi Randheer,Were you able to

Hi Randheer,

Were you able to turn this around? I am also in the same situation. Any help would be appreciated.

Thanks,

Bijoy

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bijoy Jacob
Hey Bruce,We are developing a

Hey Bruce,

We are developing a scanning module in my hybrid app using xamarin. Not an Android expert, but can understand codes. Can we create a portable library for scanning? any help would be appreciated.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


dilip nums
Can you please provide me a

Can you please provide me a sample for scanning barcodes using DataWedge.  I am developing the application using Xamarin and C#.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bijoy Jacob
Hi Dilip,Were you able to


Hi Dilip,

Were you able to turn this around? I am also in the same situation. Any help would be appreciated.

Thanks,

Bijoy

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bruce Crawford
Please see this blog for

Please see this blog for Xamarin information and also there are non Xamarin examples that are included in the EMDK for Android.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bijoy Jacob
Thanks Bruce for you reply.I

Thanks Bruce for you reply.

I have implemented this code and it is working fine. But it is mandatory to create a Datawedge profile in the device for this solution to work. We are planning to have around 4000 devices and it is not feasible to create the profile on every device. So my question here is

1. Can we programatically create a profile?

2. I read about exporting the profile and shipping it along with the apk package but didn't find any refernce.

3. Do we have any EMDK reference which will create profile automatically?

By any chance, can you share some references if any?

Thanks in advance,

Bijoy

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Check out the following link

Check out the following link to see how to create a profile using the EMDK.

In the tutorial instead of using the Keystoke input you should use the intent mechanism. The way it would work is you create a small Android application that uses our EMDK library, install that application then it would create the Datawedge profile for you (no manual entry).

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bruce Crawford
Bijoy, just to add to what

Bijoy, just to add to what Derek said.  When you put the application together as per the tutorial referenced above, the profile xml file is packaged with the application in the .apk.  After you have created a profile for one application, you can also add it to other applications by copying it to the assets folder and following the rest of the instructions to use it.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bijoy Jacob
, - I tried your approach,

, - I tried your approach, but got stuck at a point where it will create an EMDK menu in the ADT. The menu did not appear for some reason. Hence I could not progress much. Will it come automatically, once we install EMDK or any additional setting is needed for it?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bruce Crawford
Bijoy, the EMDK apparently

Bijoy, the EMDK apparently did not install properly.  I suggest uninstalling and re-installing.  Are you using the ADT bundle, or Eclipse with the Android SDK?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bijoy Jacob
@Bruce Crawford, I am using


@Bruce Crawford, I am using Eclipse with Android SDK.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bruce Crawford
Bijoy, have you tried to

Bijoy, have you tried to uninstall and re-install the EMDK?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bijoy Jacob
@Bruce Crawford Reinstalling

@Bruce Crawford Reinstalling did not help. Can you suggest any other way?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Fernando Pardo
Hi, is there a way to set or

Hi, is there a way to set or at least get the settings in the default profile of DataWedge from an application? I created an app and need to check if the settings in the current profile in DataWedge are fine (like report check digit in UPCA and so).

Application is deployed in C# , it is for Android device.

Thanks in advance.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments