diff --git a/README.md b/README.md
index 0eabf28..c74f892 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,9 @@
+![Affectiva Logo](http://developer.affectiva.com/images/logo.png)
+
+###Copyright (c) 2016 Affectiva Inc.
See the file [license.txt](license.txt) for copying permission.
+
+*****************************
+
**AffdexMe** is an app that demonstrates the use of the Affectiva Android SDK. It uses the camera on your Android device to view, process and analyze live video of your face. Start the app and you will see your face on the screen and metrics describing your expressions. Tapping the screen will bring up a menu with options to display the Processed Frames Per Second metric, display facial tracking points, and control the rate at which frames are processed by the SDK.
Most of the methods in this file control the application's UI. Therefore, if you are just interested in learning how the Affectiva SDK works, you will find the calls relevant to the use of the SDK in the initializeCameraDetector(), startCamera(), stopCamera(), and onImageResults() methods.
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 6f873df..ecc4ec4 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,4 +1,10 @@
+
+
+
@@ -17,14 +23,14 @@
+ android:label="@string/app_name"
+ android:theme="@style/MainActivityTheme">
@@ -40,8 +46,8 @@
+ android:textAppearance="@android:style/TextAppearance.Large"
+ android:theme="@android:style/Theme.DeviceDefault">
diff --git a/app/src/main/java/com/affectiva/affdexme/DrawingView.java b/app/src/main/java/com/affectiva/affdexme/DrawingView.java
index 2d78110..4d08817 100644
--- a/app/src/main/java/com/affectiva/affdexme/DrawingView.java
+++ b/app/src/main/java/com/affectiva/affdexme/DrawingView.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.affdexme;
import android.content.Context;
diff --git a/app/src/main/java/com/affectiva/affdexme/ImageHelper.java b/app/src/main/java/com/affectiva/affdexme/ImageHelper.java
index c7adb83..f6921e7 100644
--- a/app/src/main/java/com/affectiva/affdexme/ImageHelper.java
+++ b/app/src/main/java/com/affectiva/affdexme/ImageHelper.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.affdexme;
import android.content.Context;
diff --git a/app/src/main/java/com/affectiva/affdexme/MainActivity.java b/app/src/main/java/com/affectiva/affdexme/MainActivity.java
index d7fc8a3..f49fbf2 100644
--- a/app/src/main/java/com/affectiva/affdexme/MainActivity.java
+++ b/app/src/main/java/com/affectiva/affdexme/MainActivity.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.affdexme;
import android.Manifest;
@@ -64,15 +69,13 @@ import java.util.Locale;
*
* In order to use this project, you will need to:
* - 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 under AffdexMe/app/src/main/assets
* - 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 under AffdexMe/app/src/main/jniLibs
- * - Add your license file to the /assets/Affdex folder and rename to license.txt.
+ * - 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
* - Run the app on an Android device with a front-facing camera
- *
- * Copyright (c) 2014 Affectiva. All rights reserved.
*/
public class MainActivity extends AppCompatActivity
diff --git a/app/src/main/java/com/affectiva/affdexme/MetricDisplay.java b/app/src/main/java/com/affectiva/affdexme/MetricDisplay.java
index b4fb2da..bf87316 100644
--- a/app/src/main/java/com/affectiva/affdexme/MetricDisplay.java
+++ b/app/src/main/java/com/affectiva/affdexme/MetricDisplay.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.affdexme;
import android.content.Context;
diff --git a/app/src/main/java/com/affectiva/affdexme/MetricSelectionFragment.java b/app/src/main/java/com/affectiva/affdexme/MetricSelectionFragment.java
index d16f041..61f61de 100644
--- a/app/src/main/java/com/affectiva/affdexme/MetricSelectionFragment.java
+++ b/app/src/main/java/com/affectiva/affdexme/MetricSelectionFragment.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.affdexme;
import android.app.Activity;
diff --git a/app/src/main/java/com/affectiva/affdexme/MetricSelector.java b/app/src/main/java/com/affectiva/affdexme/MetricSelector.java
index 303ac0e..86732e0 100644
--- a/app/src/main/java/com/affectiva/affdexme/MetricSelector.java
+++ b/app/src/main/java/com/affectiva/affdexme/MetricSelector.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.affdexme;
import android.app.Activity;
diff --git a/app/src/main/java/com/affectiva/affdexme/MetricsManager.java b/app/src/main/java/com/affectiva/affdexme/MetricsManager.java
index 7fa5b36..1176638 100644
--- a/app/src/main/java/com/affectiva/affdexme/MetricsManager.java
+++ b/app/src/main/java/com/affectiva/affdexme/MetricsManager.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.affdexme;
import com.affectiva.android.affdex.sdk.detector.Face;
diff --git a/app/src/main/java/com/affectiva/affdexme/PreferencesUtils.java b/app/src/main/java/com/affectiva/affdexme/PreferencesUtils.java
index a88d651..1385a00 100644
--- a/app/src/main/java/com/affectiva/affdexme/PreferencesUtils.java
+++ b/app/src/main/java/com/affectiva/affdexme/PreferencesUtils.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.affdexme;
import android.content.SharedPreferences;
diff --git a/app/src/main/java/com/affectiva/affdexme/SettingsActivity.java b/app/src/main/java/com/affectiva/affdexme/SettingsActivity.java
index e10d186..480ffee 100644
--- a/app/src/main/java/com/affectiva/affdexme/SettingsActivity.java
+++ b/app/src/main/java/com/affectiva/affdexme/SettingsActivity.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.affdexme;
import android.app.ActionBar;
diff --git a/app/src/main/java/com/affectiva/errorreporting/CustomApplication.java b/app/src/main/java/com/affectiva/errorreporting/CustomApplication.java
index 224bce5..f769cd0 100644
--- a/app/src/main/java/com/affectiva/errorreporting/CustomApplication.java
+++ b/app/src/main/java/com/affectiva/errorreporting/CustomApplication.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.errorreporting;
import android.app.Application;
@@ -5,28 +10,24 @@ import android.content.Intent;
public class CustomApplication extends Application {
- static volatile boolean wasErrorActivityStarted = false;
static final boolean enableCustomErrorMessage = false;
+ static volatile boolean wasErrorActivityStarted = false;
Thread.UncaughtExceptionHandler exceptionHandler;
@Override
- public void onCreate ()
- {
+ public void onCreate() {
super.onCreate();
exceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
// Setup handler for uncaught exceptions.
- Thread.setDefaultUncaughtExceptionHandler (new Thread.UncaughtExceptionHandler()
- {
+ Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
- public void uncaughtException (Thread thread, Throwable e)
- {
- handleUncaughtException (thread, e);
+ public void uncaughtException(Thread thread, Throwable e) {
+ handleUncaughtException(thread, e);
}
});
}
- public void handleUncaughtException (Thread thread, Throwable e)
- {
+ public void handleUncaughtException(Thread thread, Throwable e) {
if (!wasErrorActivityStarted && enableCustomErrorMessage) {
Intent intent = new Intent();
intent.setAction("com.affectiva.REPORT_ERROR"); // see step 5.
@@ -36,6 +37,6 @@ public class CustomApplication extends Application {
wasErrorActivityStarted = true;
}
- exceptionHandler.uncaughtException(thread,e);
+ exceptionHandler.uncaughtException(thread, e);
}
}
diff --git a/app/src/main/java/com/affectiva/errorreporting/ErrorReporter.java b/app/src/main/java/com/affectiva/errorreporting/ErrorReporter.java
index f037024..8dbbe32 100644
--- a/app/src/main/java/com/affectiva/errorreporting/ErrorReporter.java
+++ b/app/src/main/java/com/affectiva/errorreporting/ErrorReporter.java
@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2016 Affectiva Inc.
+ * See the file license.txt for copying permission.
+ */
+
package com.affectiva.errorreporting;
import android.app.Activity;
@@ -19,8 +24,7 @@ public class ErrorReporter extends Activity implements View.OnClickListener {
@Override
- public void onCreate(Bundle savedInstanceState)
- {
+ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE); // make a dialog without a titlebar
setContentView(R.layout.error_reporter);
@@ -51,7 +55,7 @@ public class ErrorReporter extends Activity implements View.OnClickListener {
@Override
public void onClick(View v) {
- Intent intent = new Intent (Intent.ACTION_SEND);
+ Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("plain/text");
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"sdk@affectiva.com"});
intent.putExtra(Intent.EXTRA_SUBJECT, "AffdexMe Crash Report");
diff --git a/app/src/main/res/drawable/camera_button_selector.xml b/app/src/main/res/drawable/camera_button_selector.xml
index 2da78c1..4a41056 100644
--- a/app/src/main/res/drawable/camera_button_selector.xml
+++ b/app/src/main/res/drawable/camera_button_selector.xml
@@ -1,5 +1,11 @@
+
+
+
-
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/settings_button_selector.xml b/app/src/main/res/drawable/settings_button_selector.xml
index f6f77f6..bfa382f 100644
--- a/app/src/main/res/drawable/settings_button_selector.xml
+++ b/app/src/main/res/drawable/settings_button_selector.xml
@@ -1,5 +1,11 @@
+
+
+
-
+
\ No newline at end of file
diff --git a/app/src/main/res/values-large/dimens.xml b/app/src/main/res/values-large/dimens.xml
index 4ad20be..86d5288 100644
--- a/app/src/main/res/values-large/dimens.xml
+++ b/app/src/main/res/values-large/dimens.xml
@@ -1,3 +1,10 @@
+
+
+
+
24sp
14sp
@@ -7,33 +14,19 @@
190dp
180dp
15dp
-
28sp
-
64dp
12dp
-
21sp
70dp
100dp
5
-
24dp
-
26dp
-
40dp
19sp
-
5dp
10dp
-
18sp
180dp
-
-
-
-
-
-
diff --git a/app/src/main/res/values-normal/dimens.xml b/app/src/main/res/values-normal/dimens.xml
index c494c19..83bc1b0 100644
--- a/app/src/main/res/values-normal/dimens.xml
+++ b/app/src/main/res/values-normal/dimens.xml
@@ -1,3 +1,10 @@
+
+
+
+
14sp
11sp
@@ -7,28 +14,19 @@
130dp
120dp
10dp
-
20sp
-
48dp
10dp
-
17sp
60dp
80dp
3
-
15sp
30dp
-
21dp
-
18dp
-
4dp
8dp
-
15sp
140dp
-
diff --git a/app/src/main/res/values-small/dimens.xml b/app/src/main/res/values-small/dimens.xml
index b0baa49..530ab95 100644
--- a/app/src/main/res/values-small/dimens.xml
+++ b/app/src/main/res/values-small/dimens.xml
@@ -1,3 +1,10 @@
+
+
+
+
12sp
9sp
@@ -7,27 +14,19 @@
130dp
100dp
8dp
-
17sp
-
36dp
7dp
-
12sp
50dp
-
13sp
50dp
70dp
3
-
17dp
-
13dp
-
3dp
6dp
-
11sp
120dp
diff --git a/app/src/main/res/values-xlarge/dimens.xml b/app/src/main/res/values-xlarge/dimens.xml
index ae7779a..77c8393 100644
--- a/app/src/main/res/values-xlarge/dimens.xml
+++ b/app/src/main/res/values-xlarge/dimens.xml
@@ -1,3 +1,10 @@
+
+
+
+
28sp
@@ -8,30 +15,19 @@
220dp
250dp
25dp
-
35sp
-
72dp
15dp
-
-
-
30sp
110dp
130dp
7
-
26dp
-
30dp
-
60dp
24sp
-
6dp
12dp
-
22sp
200dp
-
\ No newline at end of file
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index b008135..0ac3ec7 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -1,17 +1,23 @@
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 494bbc6..7b80529 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,4 +1,10 @@
+
+
+
#55ffffff
#514a40
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 0b47bfd..8a1892d 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -1,3 +1,10 @@
+
+
+
+
14sp
11sp
@@ -7,30 +14,19 @@
140dp
120dp
10dp
-
20sp
-
-
48dp
10dp
-
17sp
60dp
80dp
3
-
15sp
30dp
-
21dp
-
-
18dp
-
4dp
8dp
-
15sp
140dp
-
diff --git a/app/src/main/res/values/metricStyleName.xml b/app/src/main/res/values/metricStyleName.xml
index f6d20dd..5c0f512 100644
--- a/app/src/main/res/values/metricStyleName.xml
+++ b/app/src/main/res/values/metricStyleName.xml
@@ -1,6 +1,13 @@
+
+
+
-
@@ -7,6 +15,7 @@
- @drawable/ic_arrow_back_white_24dp
- @style/CustomActionBarStyle
+
diff --git a/app/src/main/res/xml/preference_headers.xml b/app/src/main/res/xml/preference_headers.xml
index ff0e4fd..3d8f40c 100644
--- a/app/src/main/res/xml/preference_headers.xml
+++ b/app/src/main/res/xml/preference_headers.xml
@@ -1,9 +1,17 @@
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/settings_preferences.xml b/app/src/main/res/xml/settings_preferences.xml
index 01d7e21..c650049 100644
--- a/app/src/main/res/xml/settings_preferences.xml
+++ b/app/src/main/res/xml/settings_preferences.xml
@@ -1,4 +1,10 @@
+
+
+