The barcode widget is probably doing what you need. Make sure you are on a page that has as property Platform: Native. On such a page right click → Add widget… → type barcode and select the widget. Fill its parameters and you should be good to go.
Dear Victor,
For Hybrid mobile, on Mendix 8, it is recommend not to use the widget but to use the JavaScript Action coming from the “Hybrid Mobile Actions” modele https://appstore.home.mendix.com/link/app/112063/
This will give you way more flexibility if it comes processing your logic.
Cheers, Andries