0
0
mirror of https://github.com/markusfisch/BinaryEye.git synced 2024-09-19 19:42:18 +02:00
Yet another barcode scanner for Android
Go to file
2022-01-18 21:37:24 +01:00
app Update syntax of zxing auxiliary functions 2022-01-18 21:23:09 +01:00
fastlane/metadata/android Update changelogs for F-Droid 2021-12-15 21:22:03 +01:00
gradle/wrapper Upgrade gradle wrapper 2022-01-18 21:37:24 +01:00
svg Add adaptive icons for shortcuts 2020-11-01 17:56:00 +01:00
.gitignore Add gradle.properties to repository 2019-11-14 12:58:43 +01:00
build.gradle Update tools version 2021-12-10 19:45:45 +01:00
CHANGELOG.md Advance version number to 1.47.0 2021-12-23 20:34:15 +01:00
CONTRIBUTING.md Fix typo in remark about commit messages 2020-02-08 12:43:57 +01:00
gradle.properties Remove enableR8=true from gradle.properties 2021-08-13 09:51:12 +02:00
gradlew Upgrade gradle wrapper 2022-01-18 21:37:24 +01:00
gradlew.bat Upgrade gradle wrapper 2022-01-18 21:37:24 +01:00
LICENSE Added a license 2017-08-27 16:30:32 +02:00
Makefile Support deep links 2021-11-12 23:54:19 +01:00
PRIVACY.md Make links to permissions references 2021-12-16 22:44:33 +01:00
README.md Add documentation for Deep Links and SCAN intent 2021-11-13 15:31:39 +01:00
settings.gradle Include CameraView library over jitpack 2018-03-01 14:34:45 +01:00

Binary Eye

Yet another barcode scanner for Android. As if there weren't enough.

This one is free, without any ads and open source.

Works in portrait and landscape orientation, can read inverted codes, comes in Material Design and can also generate barcodes.

Binary Eye uses the ZXing ("Zebra Crossing") barcode scanning library.

Screenshots

Screenshot Gallery Screenshot Gallery Screenshot Theme Screenshot Editor

Download

Get it on F-Droid Get it on Google Play

Supported Barcode Formats

Read

ZXing can read the following barcode formats:

Generate

ZXing can generate the following barcode formats:

You can invoke Binary Eye with a web URI intent from anything that can open URIs. There are two options:

  1. binaryeye://scan
  2. http(s)://markusfisch.de/BinaryEye

If you want to get the scanned contents, you can add a ret query argument with a (URL encoded) URI template. For example:

http://markusfisch.de/BinaryEye?ret=http%3A%2F%2Fexample.com%2F%3Fresult%3D{RESULT}

Supported symbols are:

  • RESULT - scanned content
  • RESULT_BYTES - raw result as a hex string
  • FORMAT - barcode format
  • META - the meta data, if available

SCAN Intent

You can also use Binary Eye from other apps by using the com.google.zxing.client.android.SCAN Intent with startActivityForResult() like this:

startActivityForResult(
	Intent("com.google.zxing.client.android.SCAN"),
	SOME_NUMBER
)

And process the result in onActivityResult() of your Activity:

override fun onActivityResult(
	requestCode: Int,
	resultCode: Int,
	data: Intent?
) {
	when (requestCode) {
		SOME_NUMBER -> if (resultCode == RESULT_OK) {
			val result = data.getStringExtra("SCAN_RESULT")
			…
		}
	}
}

RenderScript

This app uses RenderScript to resize and rotate the camera image. Unfortunately, RenderScript has some nasty gotchas.

RenderScript.forceCompat()

It's necessary to call RenderScript.forceCompat() on some devices/roms.

RenderScript.forceCompat() needs to be run before any other RenderScript function and unfortunately there is no way to know if invoking forceCompat() is necessary or not.

If RenderScript.forceCompat() is necessary, a RSRuntimeException will be thrown and the only option is to restart the app, this time with calling forceCompat() first.

Calling RenderScript.forceCompat() means the processing is done in software so you probably don't want to enable it by default.

2D barcodes

If you want to fork this and are only interested in reading 2D barcodes (like QR or Aztec), you may want to remove the custom rotation kernel altogether as ZXing can read 2D barcodes in any orientation.

This will make your app a bit simpler and saves you from compiling a custom RenderScript kernel for each architecture you want to support.