Giter Site home page Giter Site logo

m1ga / ti.codescanner Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 9 KB

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

License: MIT License

Java 91.35% JavaScript 8.65%
barcode-scanner mlkit-android qrcode-scanner titanium-mobile titanium-module

ti.codescanner's Introduction

ti.codescanner - Titanium code scanner module for Andorid

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
  • 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

ti.codescanner's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ti.codescanner's Issues

Camera won't open on Android 13 with 12.1.1.GA

Using 1.0.3 released two weeks ago and just upgraded an app to 12.1.1.GA and on Android 13 it brings up the UI with the Scan code interface and colored square scan in the middle but the camera never displays... just black where the image should appear from the camera. Tried manually adding the permissions for Camera just for kicks with same result. Tried downgrading to 1.0.2 with same result. Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.