If you are using React Native, you can quickly create a camera app with React Native Camera. In addition, React Native Camera component supports barcode scanning, face detection, and text recognition. This article shares how to replace the default barcode reading function with Dynamsoft Barcode Reader for Android.
Some developers used JNA to call native C/C++ interfaces of Dynamsoft Barcode Reader in Java program. The app ran slowly and sometimes crashed. Based on the use case, I created a simple project for building JNA and JNI on Windows. The sample does not only show how to invoke native code but also share how to check the Java thread stack size and solve the stack overflow issue on Windows.
A few days ago, I accepted a new challenge of creating a simple command line barcode reader using Rust and Dynamsoft Barcode Reader SDK. Rust is a system programming language similar to C++. The learning process did not go through smoothly as I expected. It is not as easy as learning other high-level programming languages such as Java and Python. In this article, I share my experience of learning and using Rust.
The article is not about how to create Java native methods invoking C/C++ APIs. It aims to help developers to build a jar package containing JNI shared library, made with Dynamsoft Barcode Reader, for Windows, Linux, and macOS from scratch. I will demonstrate how to create JNI shared libraries with CMake, as well as how to package class files and shared libraries into jar files with Eclipse and Maven.
Previously, I demonstrated how to use OpenCV and Dynamsoft Barcode SDK to build a Python barcode reader. There’s one problem that when barcode decoding takes a long time, the webcam video didn’t play smoothly. I also tried multithread but failed to tackle the issue either due to the Python GIL(Global Interpreter Lock). Now I’m inspired by multiprocessing which is the recommended way to break through the bottleneck.