mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-10 15:50:26 -04:00

Bookmark wrapper can be created using two ways: - From a existing (cpp) bookmark (done internally by Library wrapper code) - As a totally new one (empty) the java code will have to setup (using `set*` methods). If the `Bookmark` constructor always create an empty new cpp bookmark, when we set the wrapper to point to the existing bookmark, we will have a leak of the new created bookmark. As we want to keep the "basic" constructor as the normal java api to create an empty bookmark, we need another (private) constructor to avoid the construction of an empty bookmark. The new constructor take a handle and directly set the `nativeHandle`. On `Library.getBookmarks` we cannot use the helper `BUILD_WRAPPER` and we must use "internal" function to use the `(J)V` constructor instead of the basic `()V`.
Java Libkiwix binding for Java/Kotlin
Android Library for accessing libkiwix and libzim in android with JAVA wrapper.
Steps to build
Clone java-libkiwix
git clone https://github.com/kiwix/java-libkiwix.git
cd java-libkiwix
Install dependencies
./install_deps.sh
Compile
./gradlew generateHeaderFilesFromJavaWrapper
./gradlew build
AAR file will be generated in directory lib/build/outputs/aar
Languages
Java
57.2%
C++
39.9%
CMake
1.9%
Shell
0.9%
HTML
0.1%