From ec4ffabafc2573fbb83742c6fd6d8d47aae0daf6 Mon Sep 17 00:00:00 2001 From: Vitalis Green Date: Tue, 15 Nov 2016 23:13:04 +0100 Subject: [PATCH] update alt beacon lib --- app/build.gradle | 11 ++++------- .../com/samebits/beacon/locator/BeaconLocatorApp.java | 7 ++----- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 076c41b..367a96c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId 'com.samebits.beacon.locator' minSdkVersion 18 targetSdkVersion 22 - versionCode 108 - versionName '1.0.8' + versionCode 109 + versionName '1.0.9' testApplicationId 'com.samebits.beacon.locator.test' } buildTypes { @@ -22,10 +22,7 @@ android { lintOptions { abortOnError false } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 - } + if (new File("signing.properties").exists()) { Properties signingProperties = new Properties() signingProperties.load(new FileInputStream(new File('signing.properties'))) @@ -62,7 +59,7 @@ dependencies { compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION" compile "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION" compile "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION" - compile 'org.altbeacon:android-beacon-library:2.9' + compile 'org.altbeacon:android-beacon-library:2.9.1' compile "com.google.dagger:dagger:$DAGGER_VERSION" apt "com.google.dagger:dagger-compiler:$DAGGER_VERSION" provided 'org.glassfish:javax.annotation:10.0-b28' diff --git a/app/src/main/java/com/samebits/beacon/locator/BeaconLocatorApp.java b/app/src/main/java/com/samebits/beacon/locator/BeaconLocatorApp.java index 5287d74..fcd77ea 100644 --- a/app/src/main/java/com/samebits/beacon/locator/BeaconLocatorApp.java +++ b/app/src/main/java/com/samebits/beacon/locator/BeaconLocatorApp.java @@ -21,7 +21,6 @@ import android.app.Application; import android.content.Context; import android.content.Intent; -import android.content.ServiceConnection; import android.os.Parcelable; import android.os.RemoteException; import android.support.annotation.NonNull; @@ -33,7 +32,6 @@ import com.samebits.beacon.locator.injection.module.ApplicationModule; import com.samebits.beacon.locator.model.ActionBeacon; import com.samebits.beacon.locator.model.ActionRegion; -import com.samebits.beacon.locator.model.DetectedBeacon; import com.samebits.beacon.locator.model.IManagedBeacon; import com.samebits.beacon.locator.model.RegionName; import com.samebits.beacon.locator.model.TrackedBeacon; @@ -42,7 +40,6 @@ import com.samebits.beacon.locator.util.PreferencesUtil; import org.altbeacon.beacon.Beacon; -import org.altbeacon.beacon.BeaconConsumer; import org.altbeacon.beacon.BeaconManager; import org.altbeacon.beacon.BeaconParser; import org.altbeacon.beacon.RangeNotifier; @@ -113,12 +110,12 @@ private void initBeaconManager() { mBeaconManager.setBackgroundBetweenScanPeriod(PreferencesUtil.getBackgroundScanInterval(this)); - mBeaconManager.setBackgroundScanPeriod(2000L); // default is 10000L + mBeaconManager.setBackgroundScanPeriod(8000L); // default is 10000L mBeaconManager.setForegroundBetweenScanPeriod(0L); // default is 0L mBeaconManager.setForegroundScanPeriod(1100L); // Default is 1100L mBackgroundPowerSaver = new BackgroundPowerSaver(this); - mBeaconManager.setRangeNotifier(this); + mBeaconManager.addRangeNotifier(this); try { if (mBeaconManager.isAnyConsumerBound()) { diff --git a/build.gradle b/build.gradle index 89e4cc3..6456423 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.2' + classpath 'com.android.tools.build:gradle:2.2.2' classpath 'com.android.databinding:dataBinder:1.0-rc4' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6cec618..420e140 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue May 03 10:22:40 CEST 2016 +#Mon Oct 10 21:59:30 CEST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip