Howto access Datawedge Intent output property decode_data?

G Gilbert Schwaab 3 years 7 months ago
26 1 0

My question concerns the Android Datawedge API, especially the scanned data access via Intent.

Please, explain what Intent method is to be used to access binary data from Intent properties named "com.motorolasolutions.emdk.datawedge.decode_data" or "com.symbol.datawedge.decode_data"

You describe the related data type as  "Decode data is returned as a list of byte arrays".

Please, write here at least one line of sample code, how to access this data within an Android app in Java source code.
BTW, using Intent.getStringExtra() or Intent.getByteArrayExtra() will not work.

I know, the same question was already asked by multiple developers in the last years. But it remained unanswered yet.

Thank you for your help in advance.

Please Register or Login to post a reply

1 Replies

E Efkan YILMAZ

Hi,
The code to access decode_data is as follows:

ArrayList rawData =  
  (ArrayList ) initiatingIntent.getSerializableExtra("com.symbol.datawedge.decode_data"); 
if (rawData != null) 
{ 
   byte[] rawBytes = rawData.get(0); 
   for (int i = 0; i < rawBytes.length; i++) 
     Log.d(LOG_TAG, i + ": " + rawBytes[i]); 
}

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