Combination problems with HD4000 and Datawedge

// Expert user has replied.
L Lukas Probst 1 year 4 months ago
47 2 0

Hello everyone,
I want to use Datawedge on the mobile computer TC72 to handle voice and scan input. I send a BroadcastIntent to get the data in my Android application. In the Android application I create a BroadcastReceiver. Additionally I use the HuD4000 to visualize the scanned Data.

BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
    @Override
    public void onReceive(Context context, Intent intent) {
        String data = intent.getStringExtra("com.symbol.datawedge.data_string");
        Toast.makeText(MainActivity.this, data, Toast.LENGTH_SHORT).show();
        handleData(data);
    }
};

After that I created an Intentfilter and registered the receiver:

Toast.makeText(MainActivity.getInstance(), "A", Toast.LENGTH_SHORT).show();
IntentFilter intentFilter = new IntentFilter("com.lprobst.myproject.SCAN");
Toast.makeText(MainActivity.getInstance(), "B", Toast.LENGTH_SHORT).show();
intentFilter.addCategory(Intent.CATEGORY_DEFAULT);
MainActivity.getInstance().registerReceiver(broadcastReceiver, intentFilter);

I get the message "A", but not the message "B", so I think that the program crashes in the intentfilter constructor. This also happens in the constructor, if i use the default constructor and add the action afterwards. The fun fact is, that this only happens, if the device is connected to the HD4000. If the cable of the HD40000 is not plugged in, everything works fine.
I guess the problem is, that the HuD_Service App also uses intents to visualize something on the HuD, but all in all I cant see the error.

Unfortunately I dont have any error outputs either, since I can only test the app on the hardware device and not on an emulator. 

Thank you 
Lukas Probst

Please Register or Login to post a reply

2 Replies

S Sean Kennedy

This may need to be a Help Desk case.

But also you are not out-of-luck for logging when you have the USB connected on a device to HD4000.

Use RxLogger, it is very good at capturing the LogCat to get closer to where your problem may be occurring. ( And, Zebra Libraries do not run on Emulators anyway - so Hardware is best for developing / diagnosing. )

RxLog TechDoc here:  ( Start at the Techdoc main page - book mark this - it is handy...)

https://techdocs.zebra.com/

https://techdocs.zebra.com/rxlogger/   

( RxLogger topic is in the "Device Admin" subcategory - since it is a diagnostic tool that should only be used occasionally. )

L Lukas Probst

Hello Sean,

that actually helped a lot. I forgot to include gson in the dependencies. Therefore i had a ClassNotFoundError. Im not quite sure, why it didn't worked before. Probably I didn't test it correctly.

Thank you
Lukas Probst

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