DataWedge Profile through auto import

H Hendrik Pastunink 2 years 11 months ago
9 1 0

Hello guys,
I'm developing an App at my company for scanning and managing parcels. Now I want to enable users to use Zebra TC75 to accomplish this.
Following what is said in the TC75's integrator guide I tried to copy a profile database file to the auto import folder of the TC75 in order to allow DataWedge to import the profile and enable our app to be used without having to manually create a profile. For this I also tried to follow the advice in the below discussion:
 
Re: Packaging DataWedge Profile with Application
Re: Packaging DataWedge Profile with Application
 
While the developer in the discussion seemed to have managed to manually copy the db file to the auto import folder contained in the enterprise folder on the TC75 I cannot seem to accomplish this.
 
Any help on this would be greatly appreciated.
 
The following code shows how I am trying to it:
 
private static final String PROFILE_FILE = "dwprofile_profile.db"; private static final String OUTPUT_DIR = "/enterprise/device/settings/datawedge/autoimport"; private static final String OUTPUT_TEMP_FILE = ""/_profile.db; private static final String OUTPUT_FILE = "/dwprofile_profile.db";
 
 
try {      //read file      InputStream profileInputStream = context.getAssets().open(PROFILE_FILE);      int size = profileInputStream.available();      byte[] buffer = new byte[size];      profileInputStream.read(buffer);      profileInputStream.close();       File outputDir = new File(OUTPUT_DIR);      if(!outputDir.exists())      {           outputDir.mkdirs();      }            File file = new File(OUTPUT_DIR + OUTPUT_TEMP_FILE);      FileOutputStream fOut = new FileOutputStream(file);      fOut.write(buffer);      fOut.flush();      fOut.close();       File newFile = new File(OUTPUT_DIR + OUTPUT_FILE);      file.renameTo(newFile);  } catch (IOException e) {      e.printStackTrace(); }
 
Also am I right in assuming that this is the folder enterprise folder I'm looking for?

 
EDIT: Could it be that this fails, becaus one needs root access to accomplish putting a file into the autoimport folder?

Please register or login to post a reply

1 Replies

H Hendrik Pastunink

This solved it for me:

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