-
Notifications
You must be signed in to change notification settings - Fork 8
[EN] Get Started
gujiayang edited this page Feb 26, 2017
·
2 revisions
- Download project SDK source code
git clone https://github.com/FacePlusPlus/MegviiLicmgr-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])
- 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), chooseMGLicenseManagerSDK
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
MGLicenseManagerSDK/src/main/jni
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
MGLicenseManagerSDK > :MGLicenseManagerSDK > 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 need to integrate this SDK into your project;
- You can learn more about how to use LicMgr Android SDK API.