diff --git a/CHANGELOG.md b/CHANGELOG.md index 85bd2d5f..7eec8740 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,12 @@ ####Version 0.13.7 * Pebble: Fix configuration of certain pebble apps (eg. QR Generator, Squared 4.0) +* Pebble: Add context menu option in app manager to search a watchapp in the pebble appstore * Mi Band: allow to delete Mi Band address from development settings -* Mi Band 2: Some initial hacky support for hr readings (Debug activity only) +* Mi Band 2: Initial support for heart rate readings (Debug activity only) +* Mi Band 2: Support disabled alarms +* Attempt to fix spurious device discovery problems +* Update MPAndroidChart to release 3.0 ####Version 0.13.6 * Mi Band 2: Support for multiple alarms (3 at the moment) diff --git a/README.md b/README.md index ee56c594..c54814c6 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ need to create an account and transmit any of your data to the vendor's servers. * Music control: play/pause, next track, previous track, volume up, volume down * List and remove installed apps/watchfaces * Install watchfaces and watchapps (.pbw) -* Install firwmare files (.pbz) [READ THE WIKI](https://github.com/Freeyourgadget/Gadgetbridge/wiki/Pebble-Firmware-updates) +* Install firmware files (.pbz) [READ THE WIKI](https://github.com/Freeyourgadget/Gadgetbridge/wiki/Pebble-Firmware-updates) * Install language files (.pbl) * Take and share screenshots from the Pebble's screen * PebbleKit support for 3rd Party Android Apps (experimental) diff --git a/app/build.gradle b/app/build.gradle index 7f9770cd..23df6ee1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -72,7 +72,7 @@ dependencies { compile 'com.android.support:design:23.4.0' compile 'com.github.tony19:logback-android-classic:1.1.1-4' compile 'org.slf4j:slf4j-api:1.7.7' - compile 'com.github.PhilJay:MPAndroidChart:3398cf4462bc7f49bb1156ef22040e8a0d63369f' + compile 'com.github.PhilJay:MPAndroidChart:v3.0.0' compile 'com.github.pfichtner:durationformatter:0.1.1' compile 'de.cketti.library.changelog:ckchangelog:1.2.2' compile 'net.e175.klaus:solarpositioning:0.0.9' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7bbaeae1..78c008ba 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -182,6 +182,15 @@ + + + + + + + + + { int getRepetitionMask(); + boolean isRepetitive(); + boolean getRepetition(int dow); } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/MiBand2Support.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/MiBand2Support.java index d16edfc1..20de3193 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/MiBand2Support.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/MiBand2Support.java @@ -853,9 +853,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport { } else if (MiBandService.UUID_CHARACTERISTIC_REALTIME_STEPS.equals(characteristicUUID)) { handleRealtimeSteps(characteristic.getValue()); return true; - } else if (MiBandService.UUID_CHARACTERISTIC_REALTIME_STEPS.equals(characteristicUUID)) { - handleRealtimeSteps(characteristic.getValue()); - return true; } else if (MiBandService.UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT.equals(characteristicUUID)) { handleHeartrate(characteristic.getValue()); return true; @@ -1061,7 +1058,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport { */ private void queueAlarm(Alarm alarm, TransactionBuilder builder, BluetoothGattCharacteristic characteristic) { Calendar calendar = alarm.getAlarmCal(); - int daysMask = 0; int maxAlarms = 5; // arbitrary at the moment... if (alarm.getIndex() >= maxAlarms) { @@ -1071,13 +1067,17 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport { return; } + int base = 0; if (alarm.isEnabled()) { - daysMask = alarm.getRepetitionMask(); + base = 128; + } + int daysMask = alarm.getRepetitionMask(); + if (!alarm.isRepetitive()) { + daysMask = 128; } - byte[] alarmMessage = new byte[] { (byte) 0x2, // TODO what is this? - (byte) (128 + alarm.getIndex()), // 128 is the base, alarm slot is added + (byte) (base + alarm.getIndex()), // 128 is the base, alarm slot is added (byte) calendar.get(Calendar.HOUR_OF_DAY), (byte) calendar.get(Calendar.MINUTE), (byte) daysMask, diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/MiBandSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/MiBandSupport.java index 7ae98b72..35cf1e0e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/MiBandSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/MiBandSupport.java @@ -815,9 +815,6 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport { } else if (MiBandService.UUID_CHARACTERISTIC_REALTIME_STEPS.equals(characteristicUUID)) { handleRealtimeSteps(characteristic.getValue()); return true; - } else if (MiBandService.UUID_CHARACTERISTIC_REALTIME_STEPS.equals(characteristicUUID)) { - handleRealtimeSteps(characteristic.getValue()); - return true; } else if (MiBandService.UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT.equals(characteristicUUID)) { handleHeartrate(characteristic.getValue()); return true; diff --git a/app/src/main/res/layout/item_with_details.xml b/app/src/main/res/layout/item_with_details.xml index b633bc63..6e16333f 100644 --- a/app/src/main/res/layout/item_with_details.xml +++ b/app/src/main/res/layout/item_with_details.xml @@ -28,7 +28,7 @@ android:scrollHorizontally="false" style="@style/Base.TextAppearance.AppCompat.SearchResult.Title" android:text="Item Name" - android:singleLine="true" /> + android:maxLines="1"/> + android:text="Item Name"/> + \ No newline at end of file diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 4f1b334c..4275efca 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -10,6 +10,9 @@ Suche verlegtes Gerät… Bildschirmfoto Trennen + Gerät Löschen + %1$s Löschen + Das wird das Gerät und die dazugehörigen Daten löschen! Debug App Manager @@ -52,6 +55,7 @@ SMS K9-Mail Pebble Nachrichten + Unterstützung für Anwendungen die Benachrichtigungen an die Pebble via PebbleKit senden. Andere Benachrichtigungen … auch wenn der Bildschirm an ist Bitte nicht stören @@ -102,6 +106,7 @@ Bluetooth ist abgeschaltet. berühre das verbundene Gerät, um den App Manager zu starten Tippe auf das verbundene Gerät um die Aktivitätsdaten anzuzeigen + Tippe auf das verbundene Gerät um zu vibrieren berühre ein Gerät zum Verbinden Verbindung kann nicht aufgebaut werden. BT Adresse ungültig? Gadgetbridge läuft @@ -133,7 +138,8 @@ Keine gültigen Benutzerinformationen angegeben, verwende Dummy-Daten für\'s Erste. Wenn Dein Mi Band vibriert und blinkt, tippe ein paar Mal schnell hintereinander darauf. Installieren - Mach Dein Gerät auffindbar. Derzeit verbundene Geräte sind in der Regel nicht auffindbar. Wenn Dein Gerät nach zwei Minuten nicht angezeigt wird, versuche es nach einem Neustart Deines Telefons noch einmal. + Mach Dein Gerät auffindbar. Derzeit verbundene Geräte sind in der Regel nicht auffindbar. Android 6 oder neuer braucht dafür Standortbestimmung (z.B. GPS). Wenn Dein Gerät nach zwei Minuten nicht + angezeigt wird, versuche es nach einem Neustart Deines Telefons noch einmal. Tipp: Bild des Geräts Name/Alias @@ -153,12 +159,15 @@ Ring Wecker Vibration + Test SMS Benachrichtigung Vibrationseinstellungen Sonstige Benachrichtigung - Pebble Benachrichtigung - E-Mail Benachrichtigung - Benachrichtigung für eingehende Anrufe + E-Mail + Eingehende Anrufe + Chat + Navigation + Soziales Netzwerk Verlegtes Gerät suchen Abbrechen um die Vibration zu stoppen. Deine Aktivität @@ -274,6 +283,7 @@ Wenn Du schon deine Daten importiert hast und mit dem Ergebnis zufrieden bist, k Daten importieren? Import erfolgreich. Fehler beim Importieren der DB: %1$s + Führe Aktivitätsdaten zusammen Alte Daten löschen? Daten erfolgreich gelöscht. Löschen der Datenbank fehlgeschlagen. @@ -283,4 +293,6 @@ Wenn Du schon deine Daten importiert hast und mit dem Ergebnis zufrieden bist, k Überschreiben Abbrechen Löschen + + Vibration diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 38490a67..34eee75a 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -138,7 +138,7 @@ 有効なユーザーデータはありません。今のところ、ダミーのユーザーデータを使用します。 お使いのMi Bandが振動と点滅したとき、それを連続して数回タップしてください。 インストール - お使いのデバイスを検出可能にしてください。現在、接続されたデバイスは、おそらく検出されません。お使いのデバイスが 2 分しても表示されない場合は、モバイルデバイスを再起動した後にもう一度試してください。 + お使いのデバイスを検出可能にしてください。現在、接続されたデバイスは、おそらく検出されません。Android 6 以降では位置情報を有効にする必要があります (例 GPS)。お使いのデバイスが 2 分しても表示されない場合は、モバイルデバイスを再起動した後にもう一度試してください。 注: デバイスイメージ 名前/別名 @@ -302,4 +302,7 @@ Mi Band、Pebble Health、Morpheuz からデータをインポートすること 削除 バイブレーション + %1$s (%2$s) と結合を作成中 + 結合の進行中: %1$s (%2$s) + 既に %1$s (%2$s) と結合しています。接続中… diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4f1adaff..e90479cb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -27,6 +27,7 @@ Delete Delete and remove from cache Reinstall + Open in Pebble Appstore Activate Deactivate Configure @@ -153,6 +154,10 @@ Use the Android Bluetooth Pairing dialog to pair the device. Pair your Mi Band Pairing with %s… + "Creating bond with %1$s (%2$s)" + "Unable to pair with %1$s (%2$s)" + Bonding in progress: %1$s (%2$s) + "Already bonded with %1$s (%2$s), connecting…" No mac address passed, cannot pair. Device Specific Settings Mi Band Settings @@ -164,7 +169,7 @@ No valid user data given, using dummy user data for now. When your Mi Band vibrates and blinks, tap it a few times in a row. Install - Make your device discoverable. Currently connected devices will likely not be discovered. If your device does not show up after two minutes, try again after rebooting your mobile device. + Make your device discoverable. Currently connected devices will likely not be discovered. On Android 6 or later, you need to activate location (e.g. GPS). If your device does not show up after two minutes, try again after rebooting your mobile device. Note: Device Image Name/Alias diff --git a/app/src/main/res/xml/changelog_master.xml b/app/src/main/res/xml/changelog_master.xml index f778baba..b3455775 100644 --- a/app/src/main/res/xml/changelog_master.xml +++ b/app/src/main/res/xml/changelog_master.xml @@ -2,8 +2,12 @@ Pebble: Fix configuration of certain pebble apps (eg. QR Generator, Squared 4.0) + Pebble: Add context menu option in app manager to search a watchapp in the pebble appstore Mi Band: allow to delete Mi Band address from development settings - Mi Band 2: Some initial hacky support for hr readings (Debug activity only) + Mi Band 2: Initial support for heart rate readings (Debug activity only) + Mi Band 2: Support disabled alarms + Attempt to fix spurious device discovery problems + Update MPAndroidChart to release 3.0 Mi Band 2: Support multiple alarms (3 at the moment) diff --git a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/TestBase.java b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/TestBase.java index a7120bfd..91f25328 100644 --- a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/TestBase.java +++ b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/TestBase.java @@ -10,7 +10,6 @@ import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; -import org.robolectric.shadows.ShadowLog; import java.io.File; @@ -41,7 +40,8 @@ public abstract class TestBase { @BeforeClass public static void setupSuite() throws Exception { // print everything going to android.util.Log to System.out - ShadowLog.stream = System.out; + System.setProperty("robolectric.logging", "stdout"); +// ShadowLog.stream = System.out; // properties might be preconfigured in build.gradle because of test ordering problems String logDir = System.getProperty(Logging.PROP_LOGFILES_DIR); diff --git a/build.gradle b/build.gradle index cc020c79..29d2de8a 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.0' + classpath 'com.android.tools.build:gradle:2.2.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files