Scan barcode with TC55 in more than one activity

F Fahim Ahmed 3 years 7 months ago
8 2 0

In my app, I need to scan bar code in multiple activities. I created a profile in Data Wedge & listed my app/activities in that profile. Now, let's say I have two activities where I need to scan bar code: Activity A & Activity B. In Activity A, if I press the scan button, a dialog pops up with two options, asking me to choose from Activity A & B to complete the action. If I set the action for Activity A, then it works fine for Activity A, not for Activity B.
 
I want to create a single profile for two activities & maybe configure it from my code so that Data Wedge can understand from which activity it got the call & behave accordingly. Is it possible? Any idea how to implement it?

Please Register or Login to post a reply

2 Replies

D Deven Bhagwan Pawar

Hello Fahim,

It is possible to create a single profile for two activities and configure that profile separately for those two activities.

Make sure you include package name and both the Activities of that particular package in ActivitySelection. You can even configure barcode profile for a specific Activity using ProfileConfig API so that DataWedge can understand for which Activity you have configured what changes.

Please find the attached sample project that has two Activities (A and B) and single Profile. The Barcode device type for Activity A is set to "Auto" from the wizard and for Activity B, it is configured to "Internal_Camera_1" using Profile Config API for the same profile. So when you press scan button from Activity A, it will scan using Internal Laser. When you go to Activity B and press the scan button, it will scan using Internal_Camera_1. So this will also let you understand configuring a profile programmatically using Profile Config through your app.

Thanks

F Fahim Ahmed

Hello Deven,

Thanks for your helpful answer. I imported your project but couldn't run it on my TC-55 due to this error: "INSTALL_FAILED_MISSING_SHARED_LIBRARY". Any idea on that?

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