Quikkly for Android.
Quikkly for Android 4.0 - Latest Version Download
The latest version of Quikkly for Android is V4.x - Download here
(Looking for information on Quikkly for Android V3.x? Click here)
Integrating Quikkly for Android
Note: Quikkly for Android V4.x supports Android API level 21 (Android 5.0/Lollipop) and higher only. This is required in order to support the Android Camera2 API. We do not yet support CameraX. Quikkly 3.x (deprecated) can be used if you require support as far back as API level 16.
Quikkly Libraries
The Quikkly Android SDK is split into two parts: quikklycore-lib, which contains only pure Java bindings for the Quikkly native library, and quikkly-lib, which adds Android UI and components on top of it.
JavaDocs
JavaDocs for quikklycore-lib
JavaDocs for quikkly-lib
Useful Links
Sample Android app project that demonstrates generating codes, applying styles, exporting codes to SVG and PNG, and scanning codes from camera and single images.
Getting Started
Add Quikkly SDK to your build.gradle:
repositories {
maven { url 'http://developers.quikkly.io/nexus/repository/maven-releases/' }
}
dependencies {
...
implementation 'net.quikkly.core:quikklycore-lib:3.4.5@jar'
implementation 'net.quikkly.android:quikkly-lib:3.4.5@aar'
// Dependencies required by quikkly-lib
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v13:27.1.1'
implementation 'commons-io:commons-io:2.5'
implementation 'commons-codec:commons-codec:1.11'
api 'com.caverock:androidsvg:1.2.1'
}
Please note the different Maven group ID (net.quikkly.core and net.quikkly.android) and different package types (jar and aar) between the libraries.
The Android Support library and Apache Commons library versions do not have to be exactly those - slightly older or newer versions should work as well. If you find some that do not, please let us know.
Load the Quikkly SDK on app startup
Add the following somewhere in your app, in a place where it is run before any other usage of the Quikkly SDK. Common places are MainActivity.onCreate() or MyApp.onCreate().
if (!Quikkly.isConfigured()) {
Quikkly.configureInstance(this, 2, 0);
QuikklyCore.checkLinking();
}
Quikkly.configureInstance() takes three parameters: current Context, number of maximum background threads (2 is a good default), and number of milliseconds to pause scanning between each camera frame (0 is a good default).
Launch ScanActivity
ScanActivity.launch(this, 1, true, false);
ScanActivity.launch() takes four parameters: current Context, camera zoom (1…2 is a good default), whether to enable result overlay, and whether to enable status overlay.
Use ScanFragment to handle results
TBC
Use RenderTagView to generate and display codes
TBC
Android Simulator Support
The SDK contains native libraries built for ARM-v7a, ARM64-v8a, and both 32bit and 64bit x86 CPUs. The first two are required for mobile usage, and the last two for Android simulator on the desktop. You can reduce the size the Quikkly SDK in your app by 50% by stripping out the x86 native libraries from your release builds. However, these APKs will no longer work on the Android simulator.
To remove x86 libraries, add the following to your app/build.gradle file:
android {
...
packagingOptions {
exclude 'jni/x86/libquikklycore.so'
exclude 'jni/x86/libquikklycore-jni.so'
exclude 'jni/x86_64/libquikklycore.so'
exclude 'jni/x86_64/libquikklycore-jni.so'
exclude 'lib/x86/libquikklycore.so'
exclude 'lib/x86/libquikklycore-jni.so'
exclude 'lib/x86_64/libquikklycore.so'
exclude 'lib/x86_64/libquikklycore-jni.so'
}
}
Applying Styles and Themes
TBC
Loading Custom Blueprints
If you have a custom blueprint_xxxx.json file from us, you can enable it in the Android SDK by:
Copy the file to the app/src/main/assets/ directory in your Android project.
Use the four-argument Quikkly.configureInstance():
Quikkly.configureInstance(<context>, "blueprint_xxxx.json", <max-threads>, <frame-delay-ms>);