Getting Started with Snapshot SDK for Android
The Plate Recognizer Android SDK provides high-performance license plate recognition directly on Android devices. This SDK is delivered as a complete, ready-to-use Android project with optimized TensorFlow Lite models and native libraries for efficient processing on ARM64 devices.
Overview​
The SDK enables you to:
- Perform license plate recognition directly on Android devices
- Process images with high accuracy using optimized TensorFlow Lite models
- Detect vehicle make, model, and color (requires MMC package)
- Determine vehicle direction (requires MMC package)
- Work completely offline after initial license validation
Obtaining Your Credentials​
- Sign up for a free trial at platerecognizer.com
- Log in and go to the Snapshot SDK section, and use one of the licenses.
LICENSE_KEY: Your selected Snapshot SDK license key (10 characters)TOKEN: Your API authentication token
If you already have an account and Snapshot SDK credentials, you can use your existing credentials.
SDK Contents​
The SDK is delivered as a complete Android project containing:
Project Structure​
snapshot-android/
├── app/
│ ├── src/main/
│ │ ├── jniLibs/arm64-v8a/ # Pre-compiled native libraries
│ │ │ ├── libPlateRec.so # Main recognition library
│ │ │ ├── libssl.so # OpenSSL library
│ │ │ ├── libcrypto.so # OpenSSL crypto library
│ │ │ └── libtensorflowlite.so # TensorFlow Lite library
│ │ ├── assets/ # Pre-encrypted model files
│ │ │ ├── asset0.dat # OCR and detection models
│ │ │ └── asset1.dat # MMC and direction models
│ │ ├── java/ # Sample integration code in the `com.parkpow.platerec` package
│ │ └── res/ # Android resources
│ ├── build.gradle # Pre-configured app build script
│ └── build/outputs/apk/ # Built APK files (after building)
├── gradle/ # Gradle wrapper
├── build.gradle # Project build configuration
├── gradlew # Gradle wrapper (Unix)
├── gradlew.bat # Gradle wrapper (Windows)
└── README.md # Documentation file
Additionally, the sample project includes ten sample images in various conditions located in the app/src/main/assets/ directory for testing purposes.
Key Components​
- Native Libraries (
jniLibs/arm64-v8a/): Core recognition engine and dependencies - Model Assets (
assets/): Encrypted machine learning models for OCR and vehicle detectionasset0.dat: OCR and detection modelsasset1.dat: MMC (Make, Model, Color) and direction models
- Sample Code (
java/): Complete integration examples incom.parkpow.platerecpackage - Generates APK: Compiling it produces a ready-to-use APK in
app/build/outputs/apk/debug/
System Requirements​
Device Requirements​
- Android Version: 7.0 (API level 24) or higher
- Architecture: ARM64 (arm64-v8a)
- Important: The SDK only supports native ARM64 devices
- Emulators for x86/x86_64 or devices using ARM translation layers (like Houdini) are NOT supported
- Memory (RAM):
- Minimum: 2GB
- Recommended: 4GB for optimal performance, especially when processing high-resolution images or video streams
- Storage: ~100MB for the installed application (additional space required for storing images)
- Camera: A camera is required for live recognition from a video stream
Development Requirements​
- Android Studio: Ladybug (2024.2.1) or a newer stable version
- CMake: 3.22+ (the provided project is already configured)
- Android NDK: 25+ (the provided project is already configured)
- Kotlin: 1.8+ (the project is written in Kotlin)
Quick Start​
Using the Provided Android Project​
-
Unzip the provided SDK package
-
Open the
snapshot-androiddirectory in Android Studio -
In the
local.propertiesfile, add yourLICENSE_KEYandTOKEN:LICENSE_KEY=YOUR_LICENSE_KEY
TOKEN=YOUR_TOKENdangerReplace
YOUR_LICENSE_KEYandYOUR_TOKENwith your actual credentials. See Obtaining Your Credentials for details on how to get them. -
Build and run the project on a connected ARM64 device
The sample app demonstrates how to initialize the SDK and process a few images. See the included MainActivity.kt for a complete working example.
Building the APK​
You can build the APK from the command line using the Gradle wrapper:
# Navigate to the project directory
cd snapshot-android
# Build the debug APK
./gradlew assembleDebug
# Build the release APK
./gradlew assembleRelease
# The APK will be located in app/build/outputs/apk/debug/ or app/build/outputs/apk/release/
Next Steps​
Now that you have the SDK set up, proceed to the next pages, which will guide you through testing the SDK sample app and learning how to integrate it into your application:
- Test the Sample App: Run and validate the SDK sample app.
- Integration Guide: Follow the guide to add the SDK to your own application.