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-C++ ("Zebra Crossing") barcode scanning library.
If you find this app useful and wish to support its continued development,
you can buy me a coffee or
send some Bitcoin decimals to bc1q2guk2rpll587aymrfadkdtpq32448x5khk5j8z.
ZXing can read the following barcode formats:
- AZTEC
- CODABAR
- CODE 39
- CODE 93
- CODE 128
- DATA MATRIX
- DX FILM EDGE
- EAN 8
- EAN 13
- ITF
- MAXICODE (partial)
- PDF417
- Telepen
- QR CODE
- Micro QR Code
- rMQR Code
- RSS 14
- RSS EXPANDED
- UPC A
- UPC E
- UPC EAN EXTENSION
ZXing can generate the following barcode formats:
You can invoke Binary Eye with a web URI intent from anything that can open URIs.
- binaryeye://scan (note: GitHub does not render this as clickable link)
- 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 contentRESULT_BYTES- raw result as a hex stringFORMAT- barcode format
Add continuous=true to keep scanning after each barcode. This applies only
to the current session and does not change the continuous-scanning preference.
| Parameter | Meaning in continuous mode |
|---|---|
continuous=true |
Keep the scanner open after each scan. |
callback |
Optional URL-encoded HTTP(S) endpoint receiving one JSON POST per scan. |
ret |
Optional URL-encoded URI opened when scanning ends, without substituting scan placeholders. |
For example (both nested URLs must be URL-encoded):
binaryeye://scan?continuous=true&callback=https%3A%2F%2Fexample.com%2Fscans%3Fsession%3D123&ret=https%3A%2F%2Fexample.com%2Fresults%3Fsession%3D123
Binary Eye asks for confirmation of the callback destination before scanning. Use HTTPS for remote endpoints. Credentials in the URL's user-info component and URL fragments are not supported. Authentication or a session identifier can be supplied through the endpoint's query parameters. The requests do not share the browser's cookies or execute JavaScript, so the endpoint must accept POST requests directly; an ordinary results page is not sufficient.
Each request has Content-Type: application/json; charset=utf-8. The JSON uses
the same fields as JSON scan forwarding, with an additional scanId UUID:
{
"content": "Hello world",
"raw": "48656c6c6f20776f726c64",
"format": "QRCode",
"scanId": "e1577ea7-f5ee-4ee3-905b-77134d58343d"
}content is the decoded text (empty for binary content), raw contains the
raw bytes in hexadecimal, and format is the barcode format. Additional fields
include timestamp, sequenceSize, sequenceIndex, sequenceId, and optional
barcode metadata such as errorCorrectionLevel and version. All field values
are strings; unavailable optional fields are omitted. The callback does not
include the device ID from forwarding preferences.
The next scan is enabled only after a 2xx response. Redirects are not followed. Other status codes, connection failures, and timeouts pause scanning and display an error. Choose Send again to retry the pending result or Cancel to end the session without delivering it. Requests use a five-second connection timeout and a ten-second read timeout. Pending results survive screen rotation and are included in Android's saved instance state; this is not a durable offline delivery queue.
Retries preserve the JSON body and scanId. Since a timeout can occur after
the server has accepted a request, receivers should deduplicate by scanId.
Sending individual scans avoids accumulating a batch in a return URL.
Choose Finish scanning or press Back to end the session and open ret, if
provided. While a request is in progress, wait for its response before ending
the session. ret is a navigation target, not a delivery confirmation; after
cancelling a failed request, that scan may be missing from the results page.
The server can associate scans with a session using a query parameter in
callback, as in the example above.
Without callback, continuous scanning uses the existing history and
forwarding settings, and no results are delivered automatically to the caller.
Existing forwarding and automation settings also remain active when a callback
is supplied. No forwarding configuration is required for callbacks. Without
continuous=true, the existing single-scan behavior is unchanged and callback
is ignored.
- binaryeye://encode
You can use the URL arguments content and format to automatically
preset this data. For example:
- binaryeye://encode?content=Test&format=QR_CODE
- http(s)://markusfisch.de/encode?content=Test&format=QR_CODE
- http(s)://markusfisch.de/encode?content=Test&format=DATA_MATRIX
If you want the code to be generated immediately, add execute=true (or
just execute).
You can also use Binary Eye from other apps by using an Intent.
If you prefer to integrate a barcode scanner into your app, take a look at BarcodeScannerView (if you also want to use ZXing-C++) or read how to scan barcodes with ML Kit on Android.
Use 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")
…
}
}
}If you're using AndroidX, this would be the new, recommended way:
class YourActivity : AppCompatActivity() {
private val resultLauncher = registerForActivityResult(
ActivityResultContracts.StartActivityForResult()
) { result ->
if (result.resultCode == RESULT_OK) {
val content = result.data?.getStringExtra("SCAN_RESULT")
…
}
}
fun openScanner() {
resultLauncher.launch(Intent("com.google.zxing.client.android.SCAN"))
}
}Note: The companion apps aren't developed nor maintained by the author of Binary Eye.
In order to set up Bluetooth forwarding to a computer:
- Pair your devices (phone and pc) if not paired already
- Download and run a companion app:
- In the settings of Binary Eye, enable "Forward scans with Bluetooth" and select the appropriate target host device that is running the companion application.







