Skip to content

Titanium module for the MLKit "Google code scanner" - Scan codes without any permission

License

Notifications You must be signed in to change notification settings

JeremyFlight/ti.codescanner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ti.codescanner - Titanium code scanner module for Android

Scan codes (QR, Barcodes) without any camera permission!

Based on the MLKit Google code scanner (Beta) you can use this module to make a simple QR/Barcode scanner inside your app that don't need any camera permission!

If you'll need to customize your UI or want to scan text have a look at the demo of my ti.mlkit module.

Example

const win = Ti.UI.createWindow();
const codescanner = require("ti.codescanner");
codescanner.addEventListener("complete", e => {
	console.log(e.value);
})
win.addEventListener("click", e => {
	codescanner.scan();
});
win.open();

Events

  • complete -> event.value
  • cancel
  • error -> event.message

Methods

  • scan

Known issues

On some phones the code scanner might not work or open/closes right away without any error. The Google Play Services could be an issue. The Titanium module only calls one function from Googles library. If you have a non-working phone you would need to use their support pages: https://developers.google.com/ml-kit/community

Author

Buy Me A Coke donate button

About

Titanium module for the MLKit "Google code scanner" - Scan codes without any permission

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 91.4%
  • JavaScript 8.6%