Mercurial > hgrepos > Python2 > PyMuPDF
diff mupdf-source/thirdparty/zxing-cpp/wrappers/android/README.md @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mupdf-source/thirdparty/zxing-cpp/wrappers/android/README.md Mon Sep 15 11:43:07 2025 +0200 @@ -0,0 +1,46 @@ +# ZXing-C++ Android Library + +## Install + +The easiest way to use the library is to fetch if from _mavenCentral_. Simply add **one** of the following two lines +```gradle +implementation("io.github.zxing-cpp:android:2.2.0") +implementation("io.github.zxing-cpp:android:2.3.0-SNAPSHOT") +``` +to your `build.gradle.kts` file in the `dependencies` section. To access the SNAPSHOT version, you also need to add a separate repositories entry in your `build.cradle.kts` file: + +```gradle +maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots") } +``` + +## Use + +A trivial use case looks like this (in Kotlin): + +```kotlin +import zxingcpp.BarcodeReader + +var barcodeReader = BarcodeReader() + +fun process(image: ImageProxy) { + image.use { + barcodeReader.read(it) + }.joinToString("\n") { result -> + "${result.format} (${result.contentType}): ${result.text}" + } +} +``` + +## Build locally + +1. Install AndroidStudio including NDK and CMake (see 'SDK Tools'). +2. Open the project in folder containing this README. +3. The project contains 2 modules: `zxingcpp` is the wrapper library, `app` is the demo app using `zxingcpp`. + +To build the AAR (Android Archive) from the command line: + + $ ./gradlew :zxingcpp:assembleRelease + +Then copy `zxingcpp/build/outputs/aar/zxingcpp-release.aar` into `app/libs` of your app. + +
