improved instructions on adding the Affectiva SDK

This commit is contained in:
Dan Lloyd Jones 2015-09-24 10:08:24 +10:00
parent 1b984f57dc
commit e6c51cf0a2
2 changed files with 10 additions and 8 deletions

View file

@ -52,10 +52,10 @@ import java.util.List;
* In order to use this project, you will need to: * In order to use this project, you will need to:
* - Obtain the SDK from Affectiva (visit http://www.affdex.com/mobile-sdk) * - Obtain the SDK from Affectiva (visit http://www.affdex.com/mobile-sdk)
* - Copy the SDK assets folder contents into this project's assets folder * - Copy the SDK assets folder contents into this project's assets folder
* - Copy the SDK libs folder contents into this project's libs folder * - Copy the contents of the SDK's libs folder into this project's libs folder under AffdexMe/app/lib
* - Copy the armeabi-v7a folder (found in the SDK libs folder) into this project's jniLibs folder * - Copy the armeabi-v7a folder (found in the SDK libs folder) into this project's jniLibs folder under AffdexMe/app/src/main/jniLibs
* - Add your license file to the /assets/Affdex folder and uncomment the line in the startCamera() method * - Add your license file to the /assets/Affdex folder and rename to license.txt.
* to type in your license file name * (Note: if you name the license file something else you will need to update the licensePath in the initializeCameraDetector() method in MainActivity)
* - Build the project * - Build the project
* - Run the app on an Android device with a front-facing camera * - Run the app on an Android device with a front-facing camera
* *
@ -213,7 +213,9 @@ public class MainActivity extends Activity
* that view will be painted with what the camera sees. * that view will be painted with what the camera sees.
*/ */
detector = new CameraDetector(this, CameraDetector.CameraType.CAMERA_FRONT, cameraView); detector = new CameraDetector(this, CameraDetector.CameraType.CAMERA_FRONT, cameraView);
detector.setLicensePath("YourLicenseFile");
// update the license path here if you name your file something else
detector.setLicensePath("license.txt");
detector.setImageListener(this); detector.setImageListener(this);
detector.setFaceListener(this); detector.setFaceListener(this);
detector.setCameraDetectorDimensionsListener(this); detector.setCameraDetectorDimensionsListener(this);

View file

@ -18,9 +18,9 @@ The AffdexMe folder is an Android Studio project.
In order to use this project, you will need to: In order to use this project, you will need to:
- Obtain the Affectiva Android SDK - Obtain the Affectiva Android SDK
- Copy the contents of the SDK's assets folder into this project's assets folder - Copy the contents of the SDK's assets folder into this project's assets folder
- Copy the contents of the SDK's libs folder into this project's libs folder - Copy the contents of the SDK's libs folder into this project's libs folder under AffdexMe/app/lib
- Copy the armeabi-v7a folder (found in the SDK libs folder) into this project's jniLibs folder - Copy the armeabi-v7a folder (found in the SDK libs folder) into this project's jniLibs folder under AffdexMe/app/src/main/jniLibs
- Add your license file to the /assets/Affdex folder and uncomment the line in the startCamera() method which specifies your license file path - Add your license file to the /assets/Affdex folder and rename to license.txt. (Note: if you name the license file something else you will need to update the licensePath in the initializeCameraDetector() method in MainActivity)
- Build the project - Build the project
- Run the app on an Android device with a front-facing camera - Run the app on an Android device with a front-facing camera