3 Replies Latest reply on Aug 20, 2014 9:32 AM by Deven Bhagwan Pawar

    Scan barcode with TC55 in more than one activity

    Fahim Ahmed

      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?

        • Re: Scan barcode with TC55 in more than one activity

          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