Skip to content

[EN] Get Started

gujiayang edited this page Feb 26, 2017 · 2 revisions
  1. 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.

  1. 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])

  1. 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), choose MGLicenseManagerSDKfolder, click OK;

Face++ import

  • 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 add ndk.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:

Face++ import so

  • Click 'gradle > refresh all Gradle projects', now you have imported .so library successfully.

Face++ gradle refresh

  1. 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;

releaseAll

  • 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 click releaseAll twice to export all the SDK);

finish export

  1. Next Step