Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
nativescript-barcodescanner
Advanced tools
Scan a barcode (or a QR code, or a lot of other formats really)
NativeScript 1.2.3 (tns --version
) has solved many build issues, so please upgrade if you need to.
Check if you have Android-19 installed (required for building the ZXing library), run this from the command prompt:
android list targets
If it's not listed, run:
android
.. and install Android 4.2.2 > SDK Platform
From the command prompt go to your app's root folder and execute:
tns plugin add nativescript-barcodescanner
var barcodescanner = require("nativescript-barcodescanner");
barcodescanner.scan({
cancelLabel: "Stop scanning", // iOS only, default 'Close'
message: "Go scan something", // Android only, default is 'Place a barcode inside the viewfinder rectangle to scan it.'
preferFrontCamera: false, // Android only, default false
showFlipCameraButton: true // Android only, default false (on iOS it's always available)
}).then(
function(result) {
console.log("Scan format: " + result.format);
console.log("Scan text: " + result.text);
},
function(error) {
console.log("No scan: " + error);
}
)
Note that the Android implementation will always return true
at the moment.
var barcodescanner = require("nativescript-barcodescanner");
barcodescanner.available().then(
function(avail) {
console.log("Available? " + avail);
}
);
FAQs
Scan QR/barcodes with your NativeScript app.
The npm package nativescript-barcodescanner receives a total of 150 weekly downloads. As such, nativescript-barcodescanner popularity was classified as not popular.
We found that nativescript-barcodescanner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.