Barcode / QR Scanner
Overview
The Barcode / QR Scanner feature allows your app users to scan QR codes and barcodes directly from your mobile app using their device's camera.
Depending on your configuration, the scanned data can:
Open the scanned URL automatically
Redirect users to a custom Action URL
Pass the scanned value to your website using a JavaScript callback
This feature is available as a Premium add-on.
Before You Begin
Before configuring the Barcode / QR Scanner, ensure the following requirements are met:
Your app is on the Premium Plan.
The Barcode / QR Scanner add-on is enabled.
Camera Permission is enabled under Branding → App Permissions.
Your app has been published as a new version after enabling the feature, as older app versions do not support Barcode / QR Scanner.
Note: Existing app versions will not support this feature. After enabling the Barcode / QR Scanner, you must publish a new app version for the scanner to work.
Enable Barcode / QR Scanner

Go to Add-ons → Barcode / QR Scanner.
Enable the Barcode / QR Scanner toggle.
Save your changes.
Publish your app.
Once enabled, the scanner can be assigned to supported buttons in your app.
Add Scanner to a Navigation Bar Button

You can launch the scanner directly from the app's Navigation Bar.
Go to Screens.
Open the desired screen.
Navigate to Navigation Bar.
Add a new button or edit an existing button.
Select Barcode / QR Scanner (Premium).
A configuration dialog will appear.
Scanner Configuration

Button Icon
Choose the icon that will appear in the navigation bar.
Code Type
Choose which type of code your scanner should detect.
QR Code
Scans QR Codes only.
When QR Code is selected, the following Process Scan Data options are available:
Open Scanned URL
Action URL
JavaScript Callback
Barcode
Scans supported barcode formats (such as Code 128, EAN-13, UPC, etc.).
When Barcode is selected, the available options are:
Action URL
JavaScript Callback
Note: Open Scanned URL is available only when QR Code is selected.
Process Scan Data
Choose what should happen after a successful scan.
Open Scanned URL
If the scanned QR Code contains a valid web URL, Twinr automatically opens that URL inside your app.
Example:
Scanned QR Code:
Result:
The user is redirected to:
Action URL
Use this option when you want to send the scanned value to a custom URL.
After selecting Action URL, an additional field appears:
Action URL
Enter the destination URL.
The URL must include the placeholder:
Example:
If the scanned code is:
Twinr will open:
Important: The
{{code}}placeholder is mandatory. Twinr replaces it with the scanned barcode or QR code value at runtime.
JavaScript Callback
Choose this option if you want your website to handle the scanned data.
After selecting JavaScript Callback, enter the name of the JavaScript function available on your website.
Example:
Your website should define the function:
Whenever a barcode or QR code is scanned, Twinr calls this function and passes the scanned data.
This option is useful if you want to:
Validate product codes
Search products
Trigger custom workflows
Navigate users based on the scanned result
Where Can I Use Barcode / QR Scanner?
Currently, the Barcode / QR Scanner can be launched from:
Navigation Bar Buttons
Support for additional UI elements may be introduced in future releases.
Important Notes
Available only on the Premium Plan.
Camera permission must be enabled.
A new app version must be published after enabling the feature.
{{code}}is required when using Action URL.Open Scanned URL is supported only for QR Code.
JavaScript Callback requires the specified function to exist on your website.
FAQs
Why isn't the Barcode / QR Scanner working in my app?
Make sure:
Barcode / QR Scanner is enabled.
Camera permission is enabled.
You have published a new app version.
You are using the latest version of your mobile app.
What is the difference between QR Code and Others?
QR Code scans only QR Codes and supports Open Scanned URL.
Others scans supported barcode formats and supports Action URL and JavaScript Callback.
Is {{code}} required for Action URL?
Yes. Twinr replaces {{code}} with the scanned value. Without it, the scanned data cannot be passed to your destination URL.
Can I process the scanned data using JavaScript?
Yes. Select JavaScript Callback and enter the name of a JavaScript function available on your website. Twinr will invoke that function with the scanned result after a successful scan.
Last updated