-
Notifications
You must be signed in to change notification settings - Fork 74
[EN] Get Started
- Download project SDK source code
git clone https://github.com/FacePlusPlus/MegviiFacepp-Android-SDK.git
Note: if you are not using the latest version, please find corresponding version in tags.
- Download Face++ Face SDK
Please create an account on Face++ website, and download Android SDK (Online Licensing version) from the console. (For Offline Licensing version, please contact our sales: [email protected])
Note: in the SDK downloaded from Face++ webiste, a compiled static library has already been included. You can skip the steps below, and refer to Deploy a Demo for how to use this SDK to build a simple app with face detection features.
- Import .so Library
- Open Android Studio, choose
Open an existing Android Studio project
, navigate into the directory that contains SDK source code. (You may wait for seconds, because AS is sometimes slow) ChooseMGFaceppSDK
folder, click OK;
-
After this project is imported into Android Studio (Note: if your ndk-build is not installed by AS, you'll have to set the directory of ndk-build. Choose
local.properties
and addndk.dir=[your ndk-build dir]
), you will see gradle did not run successfully, which is because .so library needs to be imported; -
Unzip the SDK downloaded from Face++ website, copy .so library to
MGFaceppSDK/src/main/jni
folder, and copy model files to the folder as follows:
- Click 'gradle > refresh all Gradle projects', now you have imported .so library successfully.
- Export SDK
- SDK can be exported as aar file for Android Studio, or jar + *.so file for Eclipse;
- Uncollapse gradle functions on right side, double click
MGFaceppSDK > :MGFaceppSDK > Task > other > releaseAll
, gradle will start compiling automatically;
- We will then see
release
folder in Project view on left side, which contains exported SDK and algorithm models (due to dependency, sometimes you may have to clickreleaseAll
twice to export all the SDK);
- Next Step
- After compiling a static library, you can refer to Deploy a Demo for how to use this SDK to build a simple app with face detection features.