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 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?
Please make sure you include the respective version of EMDK library after importing the sample project.
To do that, use following steps:
1. Right Click your project
2. Select "Properties"
3. Select "Android" section on left hand side.
4. Add the respective EMDK API in the "Project Build Target".
5. Click Apply and OK.
6. Clean your project and you should be able to run the app.
Please find the attached screenshot that mentions selection of your EMDK API.
If this approach doesn't work then you need to open the command prompt or terminal, navigate to ADT-Bundle/SDK/Platform-Tools and do "adb start-server". This will restart your adb and you won't get "INSTALL_FAILED_MISSING_SHARED_LIBRARY" error after running the application. Please find the attached screenshot for this approach.
If none of the above works, you need to perform Enterprise Reset on your TC55 device and re-install EMDK for Android and follow the steps of the first approach above.
You can download specific Enterprise Reset package for TC55 device from this link: