As phonegap has a plugin you might be able to create a widget to suit your purpose.
For some inspiration have a look at: https://github.com/lapavila/RFIDScannerPlugin
For Mendix 7 you should look at plugins for Cordova/Phonegap as Erwin says. For Mendix 8 you could look at React Native plugins. There are multiple available. We didn't get it to work yet in Mx8 though, because we needed to make some changes in the plugin XML that's not yet accessible.