From 26c57d9b9d5cb7943ac3273891c8918b6a42b18b Mon Sep 17 00:00:00 2001 From: Mostafa Zaher Date: Wed, 8 Jun 2016 12:48:48 +0200 Subject: [PATCH 01/13] Add extra permissions --- app/src/main/AndroidManifest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 96b31ca..bb64ece 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,6 +11,8 @@ + + Date: Wed, 8 Jun 2016 12:49:02 +0200 Subject: [PATCH 02/13] Version bump --- app/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f8b6203..049698f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.affectiva.affdexme" minSdkVersion 16 targetSdkVersion 23 - versionCode 493 - versionName "3.0.1" + versionCode 494 + versionName "3.0.2" setProperty("archivesBaseName", "AffdexMe-$versionName-$versionCode") } buildTypes { @@ -37,7 +37,7 @@ android { dependencies { //include the Affdex SDK - compile('com.affectiva.android:affdexsdk:3.0.1') + compile('com.affectiva.android:affdexsdk:3.0.2') //include project dependencies compile 'com.android.support:support-v4:23.1.1' From 49afa41ab9b3fc7c1144e694a62cd49da34f4bc8 Mon Sep 17 00:00:00 2001 From: Mostafa Zaher Date: Wed, 13 Jul 2016 22:59:39 +0200 Subject: [PATCH 03/13] Uses Affdex SDK v3.1 --- app/build.gradle | 4 ++-- build.gradle | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 049698f..1c126c3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 23 - buildToolsVersion '23.0.2' + buildToolsVersion '23.0.3' defaultConfig { applicationId "com.affectiva.affdexme" @@ -37,7 +37,7 @@ android { dependencies { //include the Affdex SDK - compile('com.affectiva.android:affdexsdk:3.0.2') + compile('com.affectiva.android:affdexsdk:3.1') //include project dependencies compile 'com.android.support:support-v4:23.1.1' diff --git a/build.gradle b/build.gradle index 46522fe..1e92f4d 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:2.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files From d843075b7079d4ae306d08fd6b27b49612b540f1 Mon Sep 17 00:00:00 2001 From: Mostafa Zaher Date: Wed, 13 Jul 2016 23:01:00 +0200 Subject: [PATCH 04/13] Version bump 3.1 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 1c126c3..c6705a9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { minSdkVersion 16 targetSdkVersion 23 versionCode 494 - versionName "3.0.2" + versionName "3.1" setProperty("archivesBaseName", "AffdexMe-$versionName-$versionCode") } buildTypes { From f411fa9af09d515a1a0c7a400862c5e9123449f3 Mon Sep 17 00:00:00 2001 From: Mostafa Zaher Date: Wed, 13 Jul 2016 23:24:55 +0200 Subject: [PATCH 05/13] Fix progard issues with AWS SDK --- app/proguard-rules.pro | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index fb45170..9a515fd 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -83,3 +83,16 @@ -keep class * extends dagger.internal.Binding -keep class * extends dagger.internal.ModuleAdapter -keep class * extends dagger.internal.StaticInjection + +-keep class org.apache.commons.logging.** { *; } +-keep class com.amazonaws.services.sqs.QueueUrlHandler { *; } +-keep class com.amazonaws.javax.xml.transform.sax.* { public *; } +-keep class com.amazonaws.javax.xml.stream.** { *; } +-keep class com.amazonaws.services.**.model.*Exception* { *; } +-keep class org.codehaus.** { *; } +-keepattributes Signature,*Annotation* + +-dontwarn javax.xml.stream.events.** +-dontwarn org.codehaus.jackson.** +-dontwarn org.apache.commons.logging.impl.** +-dontwarn org.apache.http.conn.scheme.** \ No newline at end of file From c7d21e800aaab058e11ee8a5e825644be0b9b4bc Mon Sep 17 00:00:00 2001 From: Mostafa Zaher Date: Wed, 13 Jul 2016 23:33:03 +0200 Subject: [PATCH 06/13] fixup! Fix progard issues with AWS SDK --- app/proguard-rules.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 9a515fd..9131d59 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -93,6 +93,6 @@ -keepattributes Signature,*Annotation* -dontwarn javax.xml.stream.events.** --dontwarn org.codehaus.jackson.** +-dontwarn org.fasterxml.jackson.** -dontwarn org.apache.commons.logging.impl.** -dontwarn org.apache.http.conn.scheme.** \ No newline at end of file From 9d5d1bd9fd14ea3d6981abe71a939b289e773ede Mon Sep 17 00:00:00 2001 From: Mostafa Zaher Hosney Date: Thu, 14 Jul 2016 01:09:46 +0300 Subject: [PATCH 07/13] fixup! fixup! Fix progard issues with AWS SDK --- app/proguard-rules.pro | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 9131d59..2a7d58d 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -84,15 +84,7 @@ -keep class * extends dagger.internal.ModuleAdapter -keep class * extends dagger.internal.StaticInjection --keep class org.apache.commons.logging.** { *; } --keep class com.amazonaws.services.sqs.QueueUrlHandler { *; } --keep class com.amazonaws.javax.xml.transform.sax.* { public *; } --keep class com.amazonaws.javax.xml.stream.** { *; } --keep class com.amazonaws.services.**.model.*Exception* { *; } --keep class org.codehaus.** { *; } --keepattributes Signature,*Annotation* - --dontwarn javax.xml.stream.events.** --dontwarn org.fasterxml.jackson.** --dontwarn org.apache.commons.logging.impl.** --dontwarn org.apache.http.conn.scheme.** \ No newline at end of file +-keep class com.amazonaws.** { *; } +-keepnames class com.amazonaws.** { *; } +-dontwarn com.amazonaws.** +-dontwarn com.fasterxml.** From cbf80f0216dfdb0e40b227b3599c0c8baa726b1a Mon Sep 17 00:00:00 2001 From: Mostafa Zaher Hosney Date: Mon, 18 Jul 2016 17:36:02 +0200 Subject: [PATCH 08/13] Update Travis components --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 64274b0..c07e960 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: android android: components: - tools - - build-tools-23.0.2 + - build-tools-23.0.3 - android-23 - extra - platform-tools From cd77fa5f918f03fcdcdcf026b7fefaac1b370bcd Mon Sep 17 00:00:00 2001 From: Andy Dennie Date: Tue, 19 Jul 2016 18:42:02 -0400 Subject: [PATCH 09/13] fix compile and proguard issues added @SuppressWarnings("ResourceType") to DrawingView.InitView to resolve release build compile error Cleared out the previous proguard-rules-pro file, since it was largely redundant with proguard-android.txt and the Affdex SDK's consumer-proguard-rules.pro. Added back some rules specific to this app. --- app/proguard-rules.pro | 93 ++----------------- .../com/affectiva/affdexme/DrawingView.java | 1 + 2 files changed, 7 insertions(+), 87 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 2a7d58d..4b0b2d2 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,90 +1,9 @@ # This is a configuration file for ProGuard. # http://proguard.sourceforge.net/index.html#manual/usage.html --dontskipnonpubliclibraryclasses - -# Optimization is turned off by default. Dex does not like code run -# through the ProGuard optimize and preverify steps (and performs some -# of these optimizations on its own). --dontoptimize --dontpreverify -# Note that if you want to enable optimization, you cannot just -# include optimization flags in your own project configuration file; -# instead you will need to point to the -# "proguard-android-optimize.txt" file instead of this one from your -# project.properties file. - --keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod --keep public class com.google.vending.licensing.ILicensingService --keep public class com.android.vending.licensing.ILicensingService - -# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native --keepclasseswithmembernames class * { - native ; -} - -# keep setters in Views so that animations can still work. -# see http://proguard.sourceforge.net/manual/examples.html#beans --keepclassmembers public class * extends android.view.View { - void set*(***); - *** get*(); -} - -# We want to keep methods in Activity that could be used in the XML attribute onClick --keepclassmembers class * extends android.app.Activity { - public void *(android.view.View); -} - -# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations --keepclassmembers enum * { - public static **[] values(); - public static ** valueOf(java.lang.String); -} - --keep class * implements android.os.Parcelable { - public static final android.os.Parcelable$Creator *; -} - --keepclassmembers class **.R$* { - public static ; -} - -# The support library contains references to newer platform versions. -# Don't warn about those in case this app is linking against an older -# platform version. We know about them, and they are safe. --dontwarn android.support.** - -#keep all classes (otherwise Proguard may remove classes that use reflection, injection, Gson, etc...) --keep class sun.** --keepclassmembers class sun.** {*;} --keep class android.** --keepclassmembers class android.** {*;} --keep class dagger.** --keepclassmembers class dagger.** {*;} --keep class javax.** --keepclassmembers class javax.** {*;} - -#keep certain class members (otherwise Proguard would strip the members of these classes) --keep class com.** --keepclassmembers class !com.affectiva.affdexme.MainActivity,!com.affectiva.android.affdex.sdk.detector.Detector {*;} --keepclassmembers class com.affectiva.android.affdex.sdk.detector.Detector { - public void setDetect**; -} - -# Dagger --dontwarn dagger.internal.codegen.** --keepclassmembers,allowobfuscation class * { - @javax.inject.* *; - @dagger.* *; - (); -} --keep class dagger.* { *; } --keep class javax.inject.* { *; } --keep class * extends dagger.internal.Binding --keep class * extends dagger.internal.ModuleAdapter --keep class * extends dagger.internal.StaticInjection - --keep class com.amazonaws.** { *; } --keepnames class com.amazonaws.** { *; } --dontwarn com.amazonaws.** --dontwarn com.fasterxml.** +# MainActivity accesses the following methods through reflection, so make sure they +# are kept +-keep class com.affectiva.android.affdex.sdk.detector.Face$Expressions { float get*(); } +-keep class com.affectiva.android.affdex.sdk.detector.Face$Emotions { float get*(); } +-keep class com.affectiva.android.affdex.sdk.detector.Face$Emojis { float get*(); } +-keep class com.affectiva.android.affdex.sdk.detector.Detector { void setDetect*(boolean); } diff --git a/app/src/main/java/com/affectiva/affdexme/DrawingView.java b/app/src/main/java/com/affectiva/affdexme/DrawingView.java index f49387e..6049741 100644 --- a/app/src/main/java/com/affectiva/affdexme/DrawingView.java +++ b/app/src/main/java/com/affectiva/affdexme/DrawingView.java @@ -100,6 +100,7 @@ public class DrawingView extends SurfaceView implements SurfaceHolder.Callback { drawingThread.requestCaptureBitmap = true; } + @SuppressWarnings("ResourceType") void initView() { surfaceHolder = getHolder(); //The SurfaceHolder object will be used by the thread to request canvas to draw on SurfaceView surfaceHolder.setFormat(PixelFormat.TRANSPARENT); //set to Transparent so this surfaceView does not obscure the one it is overlaying (the one displaying the camera). From fa6580bb3fc10918874b7aad1469618784784b8c Mon Sep 17 00:00:00 2001 From: Mostafa Zaher Hosney Date: Wed, 20 Jul 2016 17:37:20 +0200 Subject: [PATCH 10/13] Use the new version number of AffdexSDK 3.1-108 instead of just 3.1 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index c6705a9..ef295df 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,7 +37,7 @@ android { dependencies { //include the Affdex SDK - compile('com.affectiva.android:affdexsdk:3.1') + compile('com.affectiva.android:affdexsdk:3.1-108') //include project dependencies compile 'com.android.support:support-v4:23.1.1' From 26b620e19015b24d02e3fb8990c22f40c0824585 Mon Sep 17 00:00:00 2001 From: Andy Dennie Date: Wed, 20 Jul 2016 12:09:34 -0400 Subject: [PATCH 11/13] put mavenLocal ahead of maven.affectiva.com in build.gradle this should eliminate the issue with affdexme's Jenkin's job picking up a stale copy of the sdk aar from maven.affectiva.com. --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 1e92f4d..2a5715a 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ buildscript { allprojects { repositories { + mavenLocal() maven { url "http://maven.affectiva.com" } From 583c303ac2ad66fca53bb44839abe287ba79d5e9 Mon Sep 17 00:00:00 2001 From: Andy Dennie Date: Wed, 20 Jul 2016 12:30:28 -0400 Subject: [PATCH 12/13] update sdk dependency to 3.1-dev --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index ef295df..8fa1928 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,7 +37,7 @@ android { dependencies { //include the Affdex SDK - compile('com.affectiva.android:affdexsdk:3.1-108') + compile('com.affectiva.android:affdexsdk:3.1-dev') //include project dependencies compile 'com.android.support:support-v4:23.1.1' From 0e8c8bd6d174c89cacc8214f5b78f345787e25fc Mon Sep 17 00:00:00 2001 From: Mostafa Zaher Date: Thu, 21 Jul 2016 17:53:46 +0200 Subject: [PATCH 13/13] AffdexMe v3.1 to use Affdex SDK v3.1 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 8fa1928..c6705a9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,7 +37,7 @@ android { dependencies { //include the Affdex SDK - compile('com.affectiva.android:affdexsdk:3.1-dev') + compile('com.affectiva.android:affdexsdk:3.1') //include project dependencies compile 'com.android.support:support-v4:23.1.1'