From 466ea0d7552155e5e4c689b9f480bb9f90eef681 Mon Sep 17 00:00:00 2001
From: "florian.bramer" <florian.bramer@esrlabs.com>
Date: Mon, 15 Jun 2015 15:08:20 +0200
Subject: [PATCH] added headunit interface lib

---
 2015/android/Geofence/app/build.gradle        |  3 +--
 .../Geofence/headunitinterface/.gitignore     |  1 +
 .../Geofence/headunitinterface/build.gradle   | 24 +++++++++++++++++++
 .../headunitinterface/proguard-rules.pro      | 17 +++++++++++++
 .../headunitinterface/ApplicationTest.java    | 13 ++++++++++
 .../src/main/AndroidManifest.xml              |  8 +++++++
 .../esrlabs/headunitinterface/HeadUnit.aidl   |  9 +++++++
 .../src/main/res/values/strings.xml           |  3 +++
 2015/android/Geofence/settings.gradle         |  2 +-
 9 files changed, 77 insertions(+), 3 deletions(-)
 create mode 100644 2015/android/Geofence/headunitinterface/.gitignore
 create mode 100644 2015/android/Geofence/headunitinterface/build.gradle
 create mode 100644 2015/android/Geofence/headunitinterface/proguard-rules.pro
 create mode 100644 2015/android/Geofence/headunitinterface/src/androidTest/java/com/esrlabs/headunitinterface/ApplicationTest.java
 create mode 100644 2015/android/Geofence/headunitinterface/src/main/AndroidManifest.xml
 create mode 100644 2015/android/Geofence/headunitinterface/src/main/aidl/com/esrlabs/headunitinterface/HeadUnit.aidl
 create mode 100644 2015/android/Geofence/headunitinterface/src/main/res/values/strings.xml

diff --git a/2015/android/Geofence/app/build.gradle b/2015/android/Geofence/app/build.gradle
index 0de60c4..29af428 100644
--- a/2015/android/Geofence/app/build.gradle
+++ b/2015/android/Geofence/app/build.gradle
@@ -27,13 +27,12 @@ android {
 dependencies {
     compile fileTree(dir: 'libs', include: ['*.jar'])
     compile 'com.android.support:appcompat-v7:22.1.1'
-
     testCompile 'junit:junit:4.12'
     testCompile('org.robolectric:robolectric:3.0-rc2') {
         exclude group: 'commons-logging', module: 'commons-logging'
         exclude group: 'org.apache.httpcomponents', module: 'httpclient'
     }
-
     testCompile 'org.mockito:mockito-core:1.9.5'
     testCompile 'org.hamcrest:hamcrest-library:1.3'
+    compile project(':headunitinterface')
 }
diff --git a/2015/android/Geofence/headunitinterface/.gitignore b/2015/android/Geofence/headunitinterface/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/2015/android/Geofence/headunitinterface/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/2015/android/Geofence/headunitinterface/build.gradle b/2015/android/Geofence/headunitinterface/build.gradle
new file mode 100644
index 0000000..62fdab5
--- /dev/null
+++ b/2015/android/Geofence/headunitinterface/build.gradle
@@ -0,0 +1,24 @@
+apply plugin: 'com.android.library'
+
+android {
+    compileSdkVersion 22
+    buildToolsVersion "22.0.1"
+
+    defaultConfig {
+        minSdkVersion 15
+        targetSdkVersion 22
+        versionCode 1
+        versionName "1.0"
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+}
+
+dependencies {
+    compile fileTree(dir: 'libs', include: ['*.jar'])
+    compile 'com.android.support:appcompat-v7:22.2.0'
+}
diff --git a/2015/android/Geofence/headunitinterface/proguard-rules.pro b/2015/android/Geofence/headunitinterface/proguard-rules.pro
new file mode 100644
index 0000000..ca379fe
--- /dev/null
+++ b/2015/android/Geofence/headunitinterface/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /home/flo/android-sdks/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
diff --git a/2015/android/Geofence/headunitinterface/src/androidTest/java/com/esrlabs/headunitinterface/ApplicationTest.java b/2015/android/Geofence/headunitinterface/src/androidTest/java/com/esrlabs/headunitinterface/ApplicationTest.java
new file mode 100644
index 0000000..6082182
--- /dev/null
+++ b/2015/android/Geofence/headunitinterface/src/androidTest/java/com/esrlabs/headunitinterface/ApplicationTest.java
@@ -0,0 +1,13 @@
+package com.esrlabs.headunitinterface;
+
+import android.app.Application;
+import android.test.ApplicationTestCase;
+
+/**
+ * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
+ */
+public class ApplicationTest extends ApplicationTestCase<Application> {
+    public ApplicationTest() {
+        super(Application.class);
+    }
+}
\ No newline at end of file
diff --git a/2015/android/Geofence/headunitinterface/src/main/AndroidManifest.xml b/2015/android/Geofence/headunitinterface/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..a2aa29e
--- /dev/null
+++ b/2015/android/Geofence/headunitinterface/src/main/AndroidManifest.xml
@@ -0,0 +1,8 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.esrlabs.headunitinterface">
+
+    <application android:allowBackup="true" android:label="@string/app_name">
+
+    </application>
+
+</manifest>
diff --git a/2015/android/Geofence/headunitinterface/src/main/aidl/com/esrlabs/headunitinterface/HeadUnit.aidl b/2015/android/Geofence/headunitinterface/src/main/aidl/com/esrlabs/headunitinterface/HeadUnit.aidl
new file mode 100644
index 0000000..d881a7b
--- /dev/null
+++ b/2015/android/Geofence/headunitinterface/src/main/aidl/com/esrlabs/headunitinterface/HeadUnit.aidl
@@ -0,0 +1,9 @@
+// HeadUnit.aidl
+package com.esrlabs.headunitinterface;
+
+interface HeadUnit {
+
+    void showNotification(String text);
+
+    void hideAllNotifications();
+}
diff --git a/2015/android/Geofence/headunitinterface/src/main/res/values/strings.xml b/2015/android/Geofence/headunitinterface/src/main/res/values/strings.xml
new file mode 100644
index 0000000..81ed599
--- /dev/null
+++ b/2015/android/Geofence/headunitinterface/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">HeadUnitInterface</string>
+</resources>
diff --git a/2015/android/Geofence/settings.gradle b/2015/android/Geofence/settings.gradle
index e7b4def..7cfa3de 100644
--- a/2015/android/Geofence/settings.gradle
+++ b/2015/android/Geofence/settings.gradle
@@ -1 +1 @@
-include ':app'
+include ':app', ':headunitinterface'