diff --git a/.gitignore b/.gitignore index f6b286c..81d4b50 100644 --- a/.gitignore +++ b/.gitignore @@ -34,7 +34,7 @@ captures/ # Intellij *.iml -.idea/workspace.xml +.idea/ # Keystore files *.jks diff --git a/.gradle/2.14.1/taskArtifacts/cache.properties b/.gradle/2.14.1/taskArtifacts/cache.properties deleted file mode 100644 index 3c8f2c8..0000000 --- a/.gradle/2.14.1/taskArtifacts/cache.properties +++ /dev/null @@ -1 +0,0 @@ -#Sat Mar 25 13:13:58 GMT 2017 diff --git a/.gradle/2.14.1/taskArtifacts/cache.properties.lock b/.gradle/2.14.1/taskArtifacts/cache.properties.lock deleted file mode 100644 index 29b6619..0000000 Binary files a/.gradle/2.14.1/taskArtifacts/cache.properties.lock and /dev/null differ diff --git a/.gradle/2.14.1/taskArtifacts/fileHashes.bin b/.gradle/2.14.1/taskArtifacts/fileHashes.bin deleted file mode 100644 index 68e0668..0000000 Binary files a/.gradle/2.14.1/taskArtifacts/fileHashes.bin and /dev/null differ diff --git a/.gradle/2.14.1/taskArtifacts/fileSnapshots.bin b/.gradle/2.14.1/taskArtifacts/fileSnapshots.bin deleted file mode 100644 index 0cd48fd..0000000 Binary files a/.gradle/2.14.1/taskArtifacts/fileSnapshots.bin and /dev/null differ diff --git a/.gradle/2.14.1/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin b/.gradle/2.14.1/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin deleted file mode 100644 index c4c38b2..0000000 Binary files a/.gradle/2.14.1/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin and /dev/null differ diff --git a/.gradle/2.14.1/taskArtifacts/taskArtifacts.bin b/.gradle/2.14.1/taskArtifacts/taskArtifacts.bin deleted file mode 100644 index 8d8772f..0000000 Binary files a/.gradle/2.14.1/taskArtifacts/taskArtifacts.bin and /dev/null differ diff --git a/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin b/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin deleted file mode 100644 index f175cfb..0000000 Binary files a/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin and /dev/null differ diff --git a/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock b/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock deleted file mode 100644 index 72b1dc9..0000000 Binary files a/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock and /dev/null differ diff --git a/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin b/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin deleted file mode 100644 index b9306a6..0000000 Binary files a/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin and /dev/null differ diff --git a/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock b/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock deleted file mode 100644 index c44e9d4..0000000 Binary files a/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock and /dev/null differ diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 96cc43e..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf3..0000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 7ac24c7..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/libraries/animated_vector_drawable_25_0_1.xml b/.idea/libraries/animated_vector_drawable_25_0_1.xml deleted file mode 100644 index 80aeccf..0000000 --- a/.idea/libraries/animated_vector_drawable_25_0_1.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/appcompat_v7_25_0_1.xml b/.idea/libraries/appcompat_v7_25_0_1.xml deleted file mode 100644 index bac51b7..0000000 --- a/.idea/libraries/appcompat_v7_25_0_1.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/espresso_core_2_2_2.xml b/.idea/libraries/espresso_core_2_2_2.xml deleted file mode 100644 index 740ea82..0000000 --- a/.idea/libraries/espresso_core_2_2_2.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/espresso_idling_resource_2_2_2.xml b/.idea/libraries/espresso_idling_resource_2_2_2.xml deleted file mode 100644 index 28e9d40..0000000 --- a/.idea/libraries/espresso_idling_resource_2_2_2.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml b/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml deleted file mode 100644 index 243a62c..0000000 --- a/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/hamcrest_core_1_3.xml b/.idea/libraries/hamcrest_core_1_3.xml deleted file mode 100644 index 157e3f3..0000000 --- a/.idea/libraries/hamcrest_core_1_3.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/hamcrest_integration_1_3.xml b/.idea/libraries/hamcrest_integration_1_3.xml deleted file mode 100644 index 58b2c4b..0000000 --- a/.idea/libraries/hamcrest_integration_1_3.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/hamcrest_library_1_3.xml b/.idea/libraries/hamcrest_library_1_3.xml deleted file mode 100644 index 923d5fc..0000000 --- a/.idea/libraries/hamcrest_library_1_3.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/javawriter_2_1_1.xml b/.idea/libraries/javawriter_2_1_1.xml deleted file mode 100644 index a66fefb..0000000 --- a/.idea/libraries/javawriter_2_1_1.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/javax_annotation_api_1_2.xml b/.idea/libraries/javax_annotation_api_1_2.xml deleted file mode 100644 index 811e73f..0000000 --- a/.idea/libraries/javax_annotation_api_1_2.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/javax_inject_1.xml b/.idea/libraries/javax_inject_1.xml deleted file mode 100644 index eebeedd..0000000 --- a/.idea/libraries/javax_inject_1.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/jsr305_2_0_1.xml b/.idea/libraries/jsr305_2_0_1.xml deleted file mode 100644 index cdf9878..0000000 --- a/.idea/libraries/jsr305_2_0_1.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/junit_4_12.xml b/.idea/libraries/junit_4_12.xml deleted file mode 100644 index 305df30..0000000 --- a/.idea/libraries/junit_4_12.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/rules_0_5.xml b/.idea/libraries/rules_0_5.xml deleted file mode 100644 index 219af33..0000000 --- a/.idea/libraries/rules_0_5.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/runner_0_5.xml b/.idea/libraries/runner_0_5.xml deleted file mode 100644 index e8fe27f..0000000 --- a/.idea/libraries/runner_0_5.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/sdk_0_16_0.xml b/.idea/libraries/sdk_0_16_0.xml deleted file mode 100644 index a4db19e..0000000 --- a/.idea/libraries/sdk_0_16_0.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/support_annotations_25_0_1.xml b/.idea/libraries/support_annotations_25_0_1.xml deleted file mode 100644 index ab49259..0000000 --- a/.idea/libraries/support_annotations_25_0_1.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/support_compat_25_0_1.xml b/.idea/libraries/support_compat_25_0_1.xml deleted file mode 100644 index 92560b5..0000000 --- a/.idea/libraries/support_compat_25_0_1.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/support_core_ui_25_0_1.xml b/.idea/libraries/support_core_ui_25_0_1.xml deleted file mode 100644 index 44098f1..0000000 --- a/.idea/libraries/support_core_ui_25_0_1.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/support_core_utils_25_0_1.xml b/.idea/libraries/support_core_utils_25_0_1.xml deleted file mode 100644 index 46fd724..0000000 --- a/.idea/libraries/support_core_utils_25_0_1.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/support_fragment_25_0_1.xml b/.idea/libraries/support_fragment_25_0_1.xml deleted file mode 100644 index 0e4f134..0000000 --- a/.idea/libraries/support_fragment_25_0_1.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/support_media_compat_25_0_1.xml b/.idea/libraries/support_media_compat_25_0_1.xml deleted file mode 100644 index bc81c0e..0000000 --- a/.idea/libraries/support_media_compat_25_0_1.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/support_v4_25_0_1.xml b/.idea/libraries/support_v4_25_0_1.xml deleted file mode 100644 index a1d930a..0000000 --- a/.idea/libraries/support_v4_25_0_1.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/support_vector_drawable_25_0_1.xml b/.idea/libraries/support_vector_drawable_25_0_1.xml deleted file mode 100644 index 9941251..0000000 --- a/.idea/libraries/support_vector_drawable_25_0_1.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index b0a270f..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index ba70acc..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index ca9ea83..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,2137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1490447595447 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/TestBeacon.iml b/TestBeacon.iml deleted file mode 100644 index c7aaf00..0000000 --- a/TestBeacon.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/app.iml b/app/app.iml deleted file mode 100644 index ffdc5a9..0000000 --- a/app/app.iml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index e402e4e..4f0bd74 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,4 +28,8 @@ dependencies { testCompile 'junit:junit:4.12' compile 'com.estimote:sdk:0.16.0@aar' + compile 'com.squareup.retrofit2:retrofit:2.2.0' + compile 'com.squareup.retrofit2:converter-gson:2.2.0' + + } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ecf7fd4..f95d8b7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -16,18 +16,18 @@ android:name=".TestApplication" android:supportsRtl="true" android:theme="@style/AppTheme"> + + android:theme="@style/SplashTheme"> - - + \ No newline at end of file diff --git a/app/src/main/java/com/test/testbeacon/BeaconService.java b/app/src/main/java/com/test/testbeacon/BeaconService.java new file mode 100644 index 0000000..dab82ae --- /dev/null +++ b/app/src/main/java/com/test/testbeacon/BeaconService.java @@ -0,0 +1,14 @@ +package com.test.testbeacon; + +import retrofit2.Call; +import retrofit2.http.GET; + +/** + * Created by MTTUser on 25/03/2017. + */ + +public interface BeaconService { + + @GET("beacon.json") + Call listBecons(); +} diff --git a/app/src/main/java/com/test/testbeacon/BeaconsModel.java b/app/src/main/java/com/test/testbeacon/BeaconsModel.java new file mode 100644 index 0000000..338e594 --- /dev/null +++ b/app/src/main/java/com/test/testbeacon/BeaconsModel.java @@ -0,0 +1,70 @@ +package com.test.testbeacon; + +import java.io.Serializable; +import java.util.List; + +/** + * Created by MTTUser on 25/03/2017. + */ + +public class BeaconsModel implements Serializable{ + + private List beacons; + + public List getBeacons() { + return beacons; + } + + public void setBeacons(List beacons) { + this.beacons = beacons; + } + + public class Beacon implements Serializable { + private int minor; + private int major; + private String uuid; + private String taskName; + + public int getMinor() { + return minor; + } + + public void setMinor(int minor) { + this.minor = minor; + } + + public int getMajor() { + return major; + } + + public void setMajor(int major) { + this.major = major; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getTaskName() { + return taskName; + } + + public void setTaskName(String taskName) { + this.taskName = taskName; + } + + @Override + public String toString() { + return "BeaconsModel{" + "minor=" + minor + ", major=" + major + ", uuid='" + uuid + '\'' + ", taskName='" + taskName + '\'' + '}'; + } + } + + @Override + public String toString() { + return "BeaconsModel{" + "beacons=" + beacons + '}'; + } +} diff --git a/app/src/main/java/com/test/testbeacon/MainActivity.java b/app/src/main/java/com/test/testbeacon/MainActivity.java index 4436620..90e2ff5 100644 --- a/app/src/main/java/com/test/testbeacon/MainActivity.java +++ b/app/src/main/java/com/test/testbeacon/MainActivity.java @@ -4,7 +4,9 @@ import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.TextView; +import android.widget.Toast; import com.estimote.sdk.SystemRequirementsChecker; +import com.estimote.sdk.cloud.model.BeaconInfo; import com.estimote.sdk.cloud.model.Color; import com.test.testbeacon.estimote.BeaconID; import com.test.testbeacon.estimote.EstimoteCloudBeaconDetails; @@ -12,6 +14,7 @@ import com.test.testbeacon.estimote.ProximityContentManager; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; public class MainActivity extends AppCompatActivity { @@ -29,12 +32,17 @@ public class MainActivity extends AppCompatActivity { private static final int BACKGROUND_COLOR_NEUTRAL = android.graphics.Color.rgb(160, 169, 172); private ProximityContentManager proximityContentManager; + private List beaconsList; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + + beaconsList = (List) getIntent().getSerializableExtra("beacons"); + + proximityContentManager = new ProximityContentManager(this, Arrays.asList( // TODO: replace with UUIDs, majors and minors of your own beacons @@ -45,11 +53,14 @@ protected void onCreate(Bundle savedInstanceState) { proximityContentManager.setListener(new ProximityContentManager.Listener() { @Override public void onContentChanged(Object content) { + String text; Integer backgroundColor = null; if (content != null) { - EstimoteCloudBeaconDetails beaconDetails = (EstimoteCloudBeaconDetails) content; - text = "You're in " + beaconDetails.getBeaconName() + "'s range!"; + BeaconInfo beaconDetails = (BeaconInfo) content; + showBeaconDetected(beaconDetails); + text = "You're in " + beaconDetails.name + "'s range!"; + backgroundColor = BACKGROUND_COLORS.get(beaconDetails.color); } else { text = "No beacons in range."; @@ -62,6 +73,16 @@ public void onContentChanged(Object content) { }); } + private void showBeaconDetected(BeaconInfo beaconDetails) { + for (BeaconsModel.Beacon beacon : beaconsList) { + if (beacon.getMajor() == beaconDetails.major && beacon.getMinor() == beaconDetails.minor && beacon.getUuid().equalsIgnoreCase(beaconDetails.uuid.toString())) { + Toast.makeText(this, "Task:" + beacon.getTaskName(), Toast.LENGTH_LONG).show(); + break; + } + + } + } + @Override protected void onResume() { super.onResume(); diff --git a/app/src/main/java/com/test/testbeacon/SplashActivity.java b/app/src/main/java/com/test/testbeacon/SplashActivity.java new file mode 100644 index 0000000..bbfc532 --- /dev/null +++ b/app/src/main/java/com/test/testbeacon/SplashActivity.java @@ -0,0 +1,51 @@ +package com.test.testbeacon; + +import android.content.Intent; +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.support.v7.app.AppCompatActivity; +import android.util.Log; +import java.io.Serializable; +import retrofit2.Call; +import retrofit2.Callback; +import retrofit2.Response; +import retrofit2.Retrofit; +import retrofit2.converter.gson.GsonConverterFactory; + +/** + * Created by MTTUser on 25/03/2017. + */ + +public class SplashActivity extends AppCompatActivity { + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.splash); + + downloadData(); + } + + private void downloadData() { + Retrofit retrofit = new Retrofit.Builder() + .baseUrl("https://coolestprojectsapp.firebaseio.com/") + .addConverterFactory(GsonConverterFactory.create()) + .build(); + + BeaconService service = retrofit.create(BeaconService.class); + service.listBecons().enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + + Intent intent = new Intent(SplashActivity.this, MainActivity.class); + intent.putExtra("beacons", (Serializable) response.body().getBeacons()); + startActivity(intent); + } + + @Override + public void onFailure(Call call, Throwable t) { + Log.d("test_","Err"); + } + }); + } +} diff --git a/app/src/main/java/com/test/testbeacon/SplashScreen.java b/app/src/main/java/com/test/testbeacon/SplashScreen.java deleted file mode 100644 index 9b0c893..0000000 --- a/app/src/main/java/com/test/testbeacon/SplashScreen.java +++ /dev/null @@ -1,39 +0,0 @@ - -package com.test.testbeacon; - -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.os.Handler; - -public class SplashScreen extends Activity { - - // Splash screen timer - private static int SPLASH_TIME_OUT = 3000; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.splash); - - new Handler().postDelayed(new Runnable() { - - /* - * Showing splash screen with a timer. This will be useful when you - * want to show case your app logo / company - */ - - @Override - public void run() { - // This method will be executed once the timer is over - // Start your app main activity - Intent i = new Intent(SplashScreen.this, MainActivity.class); - startActivity(i); - - // close this activity - finish(); - } - }, SPLASH_TIME_OUT); - } - -} \ No newline at end of file diff --git a/app/src/main/java/com/test/testbeacon/estimote/EstimoteCloudBeaconDetailsFactory.java b/app/src/main/java/com/test/testbeacon/estimote/EstimoteCloudBeaconDetailsFactory.java index 55703ea..17546a1 100755 --- a/app/src/main/java/com/test/testbeacon/estimote/EstimoteCloudBeaconDetailsFactory.java +++ b/app/src/main/java/com/test/testbeacon/estimote/EstimoteCloudBeaconDetailsFactory.java @@ -20,8 +20,7 @@ public void getContent(final BeaconID beaconID, final Callback callback) { @Override public void success(BeaconInfo beaconInfo) { - callback.onContentReady(new EstimoteCloudBeaconDetails( - beaconInfo.name, beaconInfo.color)); + callback.onContentReady(beaconInfo); } @Override diff --git a/app/src/main/java/com/test/testbeacon/estimote/NearestBeaconManager.java b/app/src/main/java/com/test/testbeacon/estimote/NearestBeaconManager.java index 4b26c8f..80c1dd1 100755 --- a/app/src/main/java/com/test/testbeacon/estimote/NearestBeaconManager.java +++ b/app/src/main/java/com/test/testbeacon/estimote/NearestBeaconManager.java @@ -107,7 +107,7 @@ private static Beacon findNearestBeacon(List beacons) { } } - Log.d(TAG, "Nearest beacon: " + nearestBeacon + ", distance: " + nearestBeaconsDistance); + Log.d(TAG, "Nearest beacon: " + ", distance: " + nearestBeaconsDistance); return nearestBeacon; } } diff --git a/app/src/main/java/com/test/testbeacon/model/Gem.java b/app/src/main/java/com/test/testbeacon/model/Gem.java new file mode 100644 index 0000000..4786b5f --- /dev/null +++ b/app/src/main/java/com/test/testbeacon/model/Gem.java @@ -0,0 +1,22 @@ +package com.test.testbeacon.model; + +class Gem { + private int greenGem = 1; + private int redGem = 2; + private int yellowGem = 3; + + public Gem() { + } + + public int getGreenGem() { + return this.greenGem; + } + + public int getRedGem() { + return this.redGem; + } + + public int getYellowGem() { + return this.yellowGem; + } +} \ No newline at end of file diff --git a/app/src/main/res/layout/splash_activity.xml b/app/src/main/res/layout/splash_activity.xml new file mode 100644 index 0000000..a76aea4 --- /dev/null +++ b/app/src/main/res/layout/splash_activity.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 5885930..5b68b00 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -8,4 +8,9 @@ @color/colorAccent + + diff --git a/appathon-android.iml b/appathon-android.iml deleted file mode 100644 index 20a8cb5..0000000 --- a/appathon-android.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index a5e6eb0..61ba48f 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.2' + classpath 'com.android.tools.build:gradle:2.2.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/build/generated/mockable-android-25.jar b/build/generated/mockable-android-25.jar deleted file mode 100644 index 1fb75fa..0000000 Binary files a/build/generated/mockable-android-25.jar and /dev/null differ diff --git a/build/intermediates/dex-cache/cache.xml b/build/intermediates/dex-cache/cache.xml deleted file mode 100644 index 8f3fc15..0000000 --- a/build/intermediates/dex-cache/cache.xml +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 04e285f..fb26d54 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Dec 28 10:00:20 PST 2015 +#Sat Mar 25 15:04:51 GMT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/local.properties b/local.properties deleted file mode 100644 index 2b90074..0000000 --- a/local.properties +++ /dev/null @@ -1,10 +0,0 @@ -## This file is automatically generated by Android Studio. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file should *NOT* be checked into Version Control Systems, -# as it contains information specific to your local configuration. -# -# Location of the SDK. This is only used by Gradle. -# For customization when using a Version Control System, please read the -# header note. -sdk.dir=/Users/mttuser/Library/Android/sdk \ No newline at end of file