O'Reilly logo

TypeScript: Modern JavaScript Development by Ivo Gabe de Wolff, Vilic Vane, Remo H. Jansen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scanning QR codes

NativeScript has support for plugins. A plugin can add extra functionality, such as turning on the flash light of a phone, vibrating the phone, logging in with Facebook, or scanning QR codes. These can be installed using the command line interface of NativeScript.

We will use a NativeScript plugin to scan QR codes. The plugin is called NativeScript BarcodeScanner. It can scan QR codes and other barcode formats. The plugin can be installed using the following command:

tns plugin add nativescript-barcodescanner

Type definitions

We must add a definition file to import the plugin. The plugin does not contain type definitions, and type definitions are not available on DefinitelyTyped and TSD. It is not necessary to write definitions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required