- Android SDK (r23, platform tools r20)
- Android NDK (r9d)
- Twitter4J (4.0.2)
- OpenCV4Android (2.4.9)
- Perl
-
Ensure that the Android SDK and NDK binaries are properly included in PATH.
-
Checkout the project sub-modules:
git submodule init git submodule update -
Generate a
local.propertiesfile withandroid update project --path <path to project directory> -
Link or copy
twitter4j-core-<version>.jar,twitter4j-media-support-<version>.jar, and the entire OpenCV4Android folderOpenCV-<version>-android-sdkinto the libs folder of the project. -
Twitter requires best-effort hiding of your API keys, so a script is included to apply a simple XOR obfuscation sceme to them. From the project's directory, run
./obfuscate_twitter_keys.pl <Twitter Consumer Key> <Twitter Consumer Secret> -
From the project directory, build the native portion of the code:
ndk-build -
For an debug build, from the project directory simply run
ant debugThe result will be
bin/MobileFace-debug.apk. For a signed, release build see the Android developer documentation. -
The apk can be installed to a connected device or emulator with adb:
adb install -r bin/MobileFace-debug.apk