diff --git a/.gitignore b/.gitignore index 74659ae..58bce9a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,8 @@ build/ /*/build/ # Local configuration file (sdk path, etc) +affdexme-android.iml +gradle.properties local.properties # Proguard folder generated by Eclipse diff --git a/app/.gitignore b/app/.gitignore index 796b96d..5af3699 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1 +1,8 @@ +/app.iml /build +/jniLibs/armeabi-v7a +/libs/Affdex-sdk.jar +/libs/Affdex-sdk-javadoc.jar +/src/main/assets/Affdex/*.license +/src/main/assets/Affdex/Classifiers +/src/main/assets/Affdex/Classifiers/v_9 diff --git a/app/app.iml b/app/app.iml index 4a2dae6..a7e63e1 100644 --- a/app/app.iml +++ b/app/app.iml @@ -36,13 +36,13 @@ - + - + @@ -64,34 +64,25 @@ - + - - - - - - - + - - + - + - - + - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 3262768..1d24c2a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,15 +1,15 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 22 - buildToolsVersion '22.0.1' + compileSdkVersion 23 + buildToolsVersion '23.0.2' defaultConfig { applicationId "com.affectiva.affdexme" - minSdkVersion 16 - targetSdkVersion 22 - versionCode 14 - versionName "2.0.0" + minSdkVersion 14 + targetSdkVersion 23 + versionCode 15 + versionName "2.1.0" setProperty("archivesBaseName", "AffdexMe-$versionName-$versionCode") } buildTypes { @@ -23,30 +23,38 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } sourceSets { main { - jniLibs.srcDirs = ['native-libs'] + jniLibs.srcDirs = ['jniLibs'] jni.srcDirs = [] //disable automatic ndk-build } } } dependencies { - //gson is necessary for the license to be parsed - compile 'com.google.code.gson:gson:2.3' - - //include the Affdex SDK jars + //include the Affdex SDK jars compile files('libs/Affdex-sdk.jar') compile files('libs/Affdex-sdk-javadoc.jar') - compile files('libs/dagger-1.2.2.jar') - compile files('libs/flurry-analytics-4.1.0.jar') - compile files('libs/javax.inject-1.jar') - - //although the use of the CameraDetector class in this project does not require it, you may have to include - //the following dependencies if you use other features of the Affdex SDK - //compile 'com.android.support:support-v4:22.2.0' - //compile 'com.google.android.gms:play-services:7.5.0' - + + //include dependencies + compile 'com.squareup.dagger:dagger:1.2.2' + compile 'javax.inject:javax.inject:1' + + //although the use of the CameraDetector class in this project does not require it, you may have to include + //the following dependencies if you use other features of the Affdex SDK +// compile 'com.google.code.gson:gson:2.4' +// compile 'com.android.support:support-v4:23.1.1' +// compile 'com.android.support:appcompat-v7:23.1.1' +// compile 'com.android.support:support-v13:23.1.1' +// compile 'com.google.android.gms:play-services:8.4.0' +// compile 'com.google.android.gms:play-services-ads:8.4.0' +// compile 'com.google.android.gms:play-services-identity:8.4.0' +// compile 'com.google.android.gms:play-services-gcm:8.4.0' +// compile files('libs/flurry-analytics-5.0.0.jar') } // build a signed release apk only if the environment is configured diff --git a/app/jniLibs/READ.ME b/app/jniLibs/READ.ME new file mode 100644 index 0000000..e1be708 --- /dev/null +++ b/app/jniLibs/READ.ME @@ -0,0 +1,3 @@ +Place the native library files here. + +amreabi-v7a/libaffdexface_jni.so \ No newline at end of file diff --git a/app/libs/READ.ME b/app/libs/READ.ME new file mode 100644 index 0000000..d79e964 --- /dev/null +++ b/app/libs/READ.ME @@ -0,0 +1,4 @@ +Place the Affdex SDK JARs here. + +Affdex-sdk.jar +Affdex-sdk-javadoc.jar \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index dc76e0a..19428fd 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,10 +2,6 @@ - - @@ -15,7 +11,7 @@ diff --git a/app/src/main/assets/Affdex/READ.ME b/app/src/main/assets/Affdex/READ.ME new file mode 100644 index 0000000..1ec813e --- /dev/null +++ b/app/src/main/assets/Affdex/READ.ME @@ -0,0 +1,12 @@ +Place license file and Classifiers folder here. + +xxxxxx.license +Classifiers +Classifiers/v_9 +Classifiers/v_9/face_model_3d.bin +Classifiers/v_9/CT_pack/* +Classifiers/v_9/haarcascade/* +Classifiers/v_9/new_pack/* +Classifiers/v_9/noctali0.83/* +Classifiers/v_9/PA_pack/* +Classifiers/v_9/production_config/* diff --git a/app/src/main/java/com/affectiva/affdexme/MainActivity.java b/app/src/main/java/com/affectiva/affdexme/MainActivity.java index 45857e8..0ce160b 100644 --- a/app/src/main/java/com/affectiva/affdexme/MainActivity.java +++ b/app/src/main/java/com/affectiva/affdexme/MainActivity.java @@ -246,7 +246,8 @@ public class MainActivity extends Activity detector = new CameraDetector(this, CameraDetector.CameraType.CAMERA_FRONT, cameraView); // update the license path here if you name your file something else - detector.setLicensePath("license.txt"); +// detector.setLicensePath("license.txt"); + detector.setLicensePath("Affectiva.license"); detector.setImageListener(this); detector.setFaceListener(this); detector.setOnCameraEventListener(this); diff --git a/build.gradle b/build.gradle index 9405f3f..a6fcfe1 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.2.3' + classpath 'com.android.tools.build:gradle:1.5.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0c71e76..f23df6e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Apr 10 15:27:10 PDT 2013 +#Wed Oct 21 11:34:03 PDT 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip diff --git a/gradlew b/gradlew index 91a7e26..9d82f78 100755 --- a/gradlew +++ b/gradlew @@ -42,11 +42,6 @@ case "`uname`" in ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" @@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do fi done SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- +cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" -cd "$SAVED" >&- +cd "$SAVED" >/dev/null CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -114,6 +109,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` diff --git a/gradlew.bat b/gradlew.bat old mode 100644 new mode 100755