diff --git a/2015/android/Geofence/.idea/dictionaries/andreibechet.xml b/2015/android/Geofence/.idea/dictionaries/andreibechet.xml
new file mode 100644
index 0000000..3d533a8
--- /dev/null
+++ b/2015/android/Geofence/.idea/dictionaries/andreibechet.xml
@@ -0,0 +1,8 @@
+
+
+
+ esrlabs
+ geofence
+
+
+
\ No newline at end of file
diff --git a/2015/android/Geofence/app/app.iml b/2015/android/Geofence/app/app.iml
index d70faf7..940ead4 100644
--- a/2015/android/Geofence/app/app.iml
+++ b/2015/android/Geofence/app/app.iml
@@ -9,13 +9,12 @@
-
+
-
-
-
+
+
@@ -26,7 +25,7 @@
-
+
@@ -35,12 +34,6 @@
-
-
-
-
-
-
@@ -48,6 +41,13 @@
+
+
+
+
+
+
+
@@ -55,13 +55,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -84,11 +84,20 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/2015/android/Geofence/app/build.gradle b/2015/android/Geofence/app/build.gradle
index 2e3e2f8..3a7392b 100644
--- a/2015/android/Geofence/app/build.gradle
+++ b/2015/android/Geofence/app/build.gradle
@@ -10,6 +10,7 @@ android {
targetSdkVersion 22
versionCode 1
versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
@@ -17,9 +18,18 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
+
+ testOptions {
+ unitTests.returnDefaultValues = true
+ }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
+
+ testCompile 'junit:junit:4.12'
+
+ testCompile 'org.mockito:mockito-core:1.9.5'
+ testCompile 'org.hamcrest:hamcrest-library:1.3'
}
diff --git a/2015/android/Geofence/app/src/androidTest/java/esrlabs/com/geofence/ApplicationTest.java b/2015/android/Geofence/app/src/androidTest/java/esrlabs/com/geofence/ApplicationTest.java
deleted file mode 100644
index 1f69128..0000000
--- a/2015/android/Geofence/app/src/androidTest/java/esrlabs/com/geofence/ApplicationTest.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package esrlabs.com.geofence;
-
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * Testing Fundamentals
- */
-public class ApplicationTest extends ApplicationTestCase {
- public ApplicationTest() {
- super(Application.class);
- }
-}
\ No newline at end of file
diff --git a/2015/android/Geofence/app/src/main/AndroidManifest.xml b/2015/android/Geofence/app/src/main/AndroidManifest.xml
index cbd49b8..24f5e26 100644
--- a/2015/android/Geofence/app/src/main/AndroidManifest.xml
+++ b/2015/android/Geofence/app/src/main/AndroidManifest.xml
@@ -1,8 +1,17 @@
-
-
-
+
+
+
+
+
diff --git a/2015/android/Geofence/app/src/main/java/esrlabs/com/geofence/MyService.java b/2015/android/Geofence/app/src/main/java/esrlabs/com/geofence/MyService.java
new file mode 100644
index 0000000..00d5074
--- /dev/null
+++ b/2015/android/Geofence/app/src/main/java/esrlabs/com/geofence/MyService.java
@@ -0,0 +1,37 @@
+package esrlabs.com.geofence;
+
+import android.app.Service;
+import android.content.Intent;
+import android.location.Location;
+import android.location.LocationListener;
+import android.os.Bundle;
+import android.os.IBinder;
+
+public class MyService extends Service implements LocationListener {
+ private Location latestLocation;
+
+ public MyService() {
+ }
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ // TODO: Return the communication channel to the service.
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public void onLocationChanged(Location location) {
+ latestLocation = location;
+ }
+
+ public Location latestLocation() {
+ return latestLocation;
+ }
+
+ @Override
+ public void onStatusChanged(String s, int i, Bundle bundle) {}
+ @Override
+ public void onProviderDisabled(String s) {}
+ @Override
+ public void onProviderEnabled(String s) {}
+}
diff --git a/2015/android/Geofence/app/src/main/res/values-w820dp/dimens.xml b/2015/android/Geofence/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/2015/android/Geofence/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/2015/android/Geofence/app/src/main/res/values/dimens.xml b/2015/android/Geofence/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..47c8224
--- /dev/null
+++ b/2015/android/Geofence/app/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+
+
+ 16dp
+ 16dp
+
diff --git a/2015/android/Geofence/app/src/test/java/esrlabs.com.geofence/MyServiceTest.java b/2015/android/Geofence/app/src/test/java/esrlabs.com.geofence/MyServiceTest.java
new file mode 100644
index 0000000..7f4079a
--- /dev/null
+++ b/2015/android/Geofence/app/src/test/java/esrlabs.com.geofence/MyServiceTest.java
@@ -0,0 +1,33 @@
+package esrlabs.com.geofence;
+
+import android.test.ServiceTestCase;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+
+public class MyServiceTest extends ServiceTestCase {
+
+
+ public MyServiceTest() {
+ super(MyService.class);
+ }
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void testLatestLocation() throws Exception {
+ assert(false);
+ }
+}
\ No newline at end of file
diff --git a/2015/android/Geofence/build.gradle b/2015/android/Geofence/build.gradle
index 0eb2bb3..b77cb19 100644
--- a/2015/android/Geofence/build.gradle
+++ b/2015/android/Geofence/build.gradle
@@ -3,7 +3,8 @@
buildscript {
repositories {
jcenter {
- url "http://jcenter.bintray.com/"
+ jcenter()
+ //url "http://jcenter.bintray.com/"
}
}
dependencies {