yes, something like what you are asking for is possible.
You can create a datawedge profile for your foreground activity and receive the data as an Intent or you can integrate the Barcode API directly in your application.
You can find more information about this on our documentation website:
- Using Intent Output With DataCapture Profiles
- Using Broadcast Intent in DataCapture Profiles
- Basic Scanning Tutorial using Barcode API