diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb67a7822..8c0b2ca28 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
###Changelog
+####Version 0.5.3
+* Pebble: For generic notifications, support dismissing individual notficications and "Open on Phone" feature (OG & PT)
+* Pebble: Allow to treat K9 notifcations as generic notifications (if notification mode is set to never)
+* Ignore QKSMS notificaions to avoid double notification for incoming SMS
+* Improved UI of Firmware/App installer
+* Device state again visible on lockscreen
+* Date display and navigation now working properly for all charts
+
####Version 0.5.2
* Pebble: support "dismiss all" action also on Pebble Time/FW 3.x notifications
* Miband: show a notification when the battery is below 10%
diff --git a/README.md b/README.md
index 01bb5bf5d..0c42e1ebb 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,8 @@ need to create an account and transmit any of your data to the vendor's servers.
* SMS notification (sender, body)
* K-9 Mail notification support (sender, subject, preview)
* Support for generic notifications (above filtered out)
-* Dismiss all notifications from the action menu of a notification
+* Dismiss individial notifications or open corresponding app on phone from the action menu (generic notifications)
+* Dismiss all notifications from the action menu (non-generic notifications)
* Music playback info (artist, album, track). Apollo and CM 12.1 Music App supported.
* Music control: play/pause, next track, previous track, volume up, volume down
* List and remove installed apps/watchfaces
@@ -34,7 +35,7 @@ need to create an account and transmit any of your data to the vendor's servers.
All features are also supported on the Pebble Time, except for the following:
-* Listing installed watchfaces (it will simply display the UUIDs of previously installed watchapps, no matter if they are stil installed or not)
+* Listing installed watchfaces (it will simply display the UUIDs of previously installed watchapps, no matter if they are still installed or not)
* Firmware installation is untested and will probably not work.
## How to use (Pebble)
diff --git a/app/build.gradle b/app/build.gradle
index 40c65d15d..2a53d1da2 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -12,8 +12,8 @@ android {
applicationId "nodomain.freeyourgadget.gadgetbridge"
minSdkVersion 19
targetSdkVersion 23
- versionCode 23
- versionName "0.5.2"
+ versionCode 24
+ versionName "0.5.3"
}
buildTypes {
release {
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/FwAppInstallerActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/FwAppInstallerActivity.java
index a9f568d7c..a9ff065f3 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/FwAppInstallerActivity.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/FwAppInstallerActivity.java
@@ -179,7 +179,9 @@ public class FwAppInstallerActivity extends Activity implements InstallActivity
@Override
public void setInstallEnabled(boolean enable) {
- installButton.setEnabled(device != null && device.isConnected() && enable);
+ boolean enabled = device != null && device.isConnected() && enable;
+ installButton.setEnabled(enabled);
+ installButton.setVisibility(enabled ? View.VISIBLE : View.GONE);
}
@Override
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java
index e5cb681aa..016f93d29 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java
@@ -130,8 +130,7 @@ public class NotificationListener extends NotificationListenerService {
source.equals("com.android.dialer") ||
source.equals("com.android.mms") ||
source.equals("com.moez.QKSMS") ||
- source.equals("com.cyanogenmod.eleven") ||
- source.equals("com.fsck.k9")) {
+ source.equals("com.cyanogenmod.eleven")) {
return;
}
@@ -141,6 +140,12 @@ public class NotificationListener extends NotificationListenerService {
}
}
+ if (source.equals("com.fsck.k9")) {
+ if (!"never".equals(sharedPrefs.getString("notification_mode_k9mail", "when_screen_off"))) {
+ return;
+ }
+ }
+
LOG.info("Processing notification from source " + source);
Bundle extras = notification.extras;
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java
index ce34d9a53..84a57cee4 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java
@@ -478,7 +478,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
buf.put((byte) 0x00); // ?
buf.put((byte) 0x01); // add notifications
- buf.putInt(0x00000002); // flags - ?
+ buf.putInt(0x00000000); // flags - ?
buf.putInt(id);
buf.putInt(0x00000000); // ANCS id
buf.putInt(timestamp);
@@ -664,6 +664,27 @@ public class PebbleProtocol extends GBDeviceProtocol {
return encodeBlobdb(UUID.randomUUID(), BLOBDB_INSERT, BLOBDB_NOTIFICATION, buf.array());
}
+ public byte[] encodeActionResponse2x(int id, int iconId, String caption) {
+ short length = (short) (18 + caption.length());
+ ByteBuffer buf = ByteBuffer.allocate(LENGTH_PREFIX + length);
+ buf.order(ByteOrder.BIG_ENDIAN);
+ buf.putShort(length);
+ buf.putShort(ENDPOINT_EXTENSIBLENOTIFS);
+ buf.order(ByteOrder.LITTLE_ENDIAN);
+ buf.put(NOTIFICATIONACTION_RESPONSE);
+ buf.putInt(id);
+ buf.put((byte) 0x01); // action id?
+ buf.put(NOTIFICATIONACTION_ACK);
+ buf.put((byte) 2); //nr of attributes
+ buf.put((byte) 6); // icon
+ buf.putShort((short) 4); // length
+ buf.putInt(iconId);
+ buf.put((byte) 2); // title
+ buf.putShort((short) caption.length());
+ buf.put(caption.getBytes());
+ return buf.array();
+ }
+
public byte[] encodeActionResponse(UUID uuid, int iconId, String caption) {
short length = (short) (29 + caption.length());
ByteBuffer buf = ByteBuffer.allocate(LENGTH_PREFIX + length);
@@ -1132,7 +1153,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
return null;
}
- private GBDeviceEventNotificationControl decodeNotificationAction2x(ByteBuffer buf) {
+ private GBDeviceEvent[] decodeNotificationAction2x(ByteBuffer buf) {
buf.order(ByteOrder.LITTLE_ENDIAN);
byte command = buf.get();
@@ -1142,9 +1163,13 @@ public class PebbleProtocol extends GBDeviceProtocol {
if (action >= 0x01 && action <= 0x03) {
GBDeviceEventNotificationControl devEvtNotificationControl = new GBDeviceEventNotificationControl();
devEvtNotificationControl.handle = id;
+ GBDeviceEventSendBytes sendBytesAck = null;
+
switch (action) {
case 0x01:
devEvtNotificationControl.event = GBDeviceEventNotificationControl.Event.OPEN;
+ sendBytesAck = new GBDeviceEventSendBytes();
+ sendBytesAck.encodedBytes = encodeActionResponse2x(id, 6, "Opened");
break;
case 0x02:
devEvtNotificationControl.event = GBDeviceEventNotificationControl.Event.DISMISS;
@@ -1155,7 +1180,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
default:
return null;
}
- return devEvtNotificationControl;
+ return new GBDeviceEvent[]{sendBytesAck, devEvtNotificationControl};
}
LOG.info("unexpected paramerter in dismiss action: " + action);
}
@@ -1182,7 +1207,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
case 0x01:
dismissNotification.event = GBDeviceEventNotificationControl.Event.OPEN;
caption = "Opened";
- icon_id = 47; // FIXME: find a better one
+ icon_id = 49;
break;
case 0x02:
dismissNotification.event = GBDeviceEventNotificationControl.Event.DISMISS;
@@ -1488,7 +1513,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
devEvts = new GBDeviceEvent[]{decodeScreenshot(buf, length)};
break;
case ENDPOINT_EXTENSIBLENOTIFS:
- devEvts = new GBDeviceEvent[]{decodeNotificationAction2x(buf)};
+ devEvts = decodeNotificationAction2x(buf);
break;
case ENDPOINT_NOTIFICATIONACTION:
devEvts = decodeNotificationAction3x(buf);
diff --git a/app/src/main/res/layout/activity_appinstaller.xml b/app/src/main/res/layout/activity_appinstaller.xml
index 3e64f9150..8846623b0 100644
--- a/app/src/main/res/layout/activity_appinstaller.xml
+++ b/app/src/main/res/layout/activity_appinstaller.xml
@@ -1,4 +1,4 @@
-
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="false">
+ android:layout_alignParentTop="false"
+ android:layout_alignParentEnd="false"
+ android:layout_alignParentStart="false"
+ android:layout_below="@+id/itemListView" />
+ android:layout_centerHorizontal="true"
+ android:layout_alignParentTop="false"
+ android:layout_alignParentLeft="false"
+ android:layout_below="@+id/infoTextView" />
+ android:visibility="gone"
+ android:layout_below="@+id/fwappStatusIcon"
+ android:layout_centerHorizontal="true" />
+ android:enabled="false"
+ android:layout_alignParentBottom="false"
+ android:layout_alignWithParentIfMissing="false"
+ android:layout_alignParentTop="false"
+ android:layout_alignParentLeft="false"
+ android:layout_centerHorizontal="true"
+ android:layout_below="@+id/installProgressBar"
+ android:layout_marginTop="10dp" />
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true" />
-
+
diff --git a/app/src/main/res/layout/activity_charts.xml b/app/src/main/res/layout/activity_charts.xml
index 6bc2f9d2b..f98c1a5d8 100644
--- a/app/src/main/res/layout/activity_charts.xml
+++ b/app/src/main/res/layout/activity_charts.xml
@@ -21,7 +21,7 @@
android:text="<" />
Debug
BeendenSchlafmonitor (ALPHA)
- Gerätesuche
+ Verlegtes Gerät findenBildschirmfotoTrennenDebug
@@ -64,7 +64,7 @@
GerätesucheSuche beendenSuche starten
- Gerät suchen
+ Neues Gerät verbinden%1$s (%2$s)Gerät paarenVerwende den Android Bluetooth Paaren-Dialog um Dein Gerät zu paaren.
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index abc637dfb..0bfb925f4 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -16,10 +16,6 @@
BorrarInstalador de FW/App
- Estás a punto de instalar el firmware %s en lugar del que está actualmente en tu MiBand.
- Este firmware ha sido probado y se sabe que es compatible con GadgetBridge.
- Este firmware no se ha probado y puede no ser compatible con GadgetBridge. No se recomienda la instalación en tu MiBand.
- Si a pesar de esto deseas continuar y las cosas continúan funcionando bien posteriormente, por favor, informa a los desarrolladores de GadgetBridge para que incluyan la versión de firmware:%s en la lista blancaAjustesAjustes generales
@@ -146,7 +142,6 @@
No se ha podido encontrar un controlador para instalar este archivo.No se puede instalar el archivo: $1%sNo se puede instalar este firmware: no coincide con la revision hardware de tu Pebble.
- Por favor, espera mientras se determina el estado de la instalación ...Tu sueñoPasos por semanaTu actividad y sueño
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 44ec84417..a86ebf6b6 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -12,11 +12,12 @@
DéconnexionDébugger
+ Gestionnaire d\'applicationSupprimer
- Vous êtes sur le point d\'installer le firmware %s à la place de celui qui est actuellement sur votre MiBand.
- Ce firmware a été testé et est compatible with GadgetBridge
- Ce firmware n\'est pas testé and peut ne pas être compatible avec GadgetBridge. Il ne vous est pas conseillé de flasher votre MiBand
+ Vous êtes sur le point d\'installer le firmware %s à la place de celui qui est actuellement sur votre Mi Band.
+ Ce firmware a été testé et est connu pour être compatible avec Gadgetbridge.
+ Ce firmware n\'a pas été testé et peut ne pas être compatible avec Gadgetbridge. \ N \ nIl n\'est pas conseillé de flasher votre Mi Band.ParamètreParamètres généraux
@@ -30,6 +31,7 @@
Appel entrantK9-EmailMessage Pebble
+ Support pour les applications qui envoient des notifications au Pebble via Intent. Peut être utilisé pour les conversations.Support des notififactions génériquesmême lorsque l\'écran est allumétoujours
@@ -54,6 +56,7 @@
Ceci est un test de notification venant de GadgetbridgeLe bluetooth n\'est pas supportéLe bluetooth est désactivé
+ Taper sur lpour le connecter au gestionnaire d\'applicationTapper sur l\'appareil pour le connecterNe peut être connecter. L’adresse bluetooth est invalide? Gadgetbridge est en fonctionnement
@@ -61,6 +64,7 @@
installation en échecinstallation réaliséVOUS ÊTES EN TRAIN D\'INSTALLER UN FIRMWARE, PROCEDEZ À VOS PROPRES RISQUES. CE FIRMWARE EST POUR LA VERSION HW: %s
+ Vous êtes sur le point d\'installer l\'application suivante:\n\n\n%1$s Version %2$s par %3$s\nN/Ainitialisé%1$s par %2$s
@@ -86,6 +90,7 @@
InstallerRendre votre appareil découvrable. Actuellement les appareils connectés ne seront pas découvert.Note:
+ Image de l\'appareilA propos de vousNom/PseudoAnnée de naissance
@@ -96,6 +101,7 @@
Moniteur de sommeilEcrire le fichier de logs (besoin de redemarrer)iniitialisation
+ Récupération des données d\'activitéDe %1$s à %2$sPort main gauche ou droite?Profil de vibration
@@ -138,5 +144,27 @@
Impossible de trouver un gestionnaire pour installer ce fichier.Impossible d\'installer le fichier donné: $1%sImpossible d\'installer le firmware donnée: il ne correspond pas à la version du matériel de votre Pebble.
- S\'il vous plaît patienter pendant la détermination de l\'état de l\'installation ...
+ S\'il vous plait patientez pendant la détermination du status de l\'installation...
+ Gadget batterie Vide!
+ %1$s batterie restante: %2$s%%
+ Dernière charge: %s \n
+ Nombre de charges: %s
+ Votre sommeil
+ Pas de la semaine
+ Votre activité et sommeil
+ Mise à jour du Firmware...
+ Le fichier ne peut pas être installé, l\'appareil n\'est pas prêt.
+ Firmware Mi Band %1$s
+ Version compatible
+ Version non testé!
+ Connexion à l\'appareil: %1$s
+ Firmware Pebble %1$s
+ Révision correcte du matériel
+ Version Hardware incorrecte!
+ %1$s (%2$s)
+ Problème avec le transfert du firmware. Ne redémarrez pas votre bande Mi!
+ Problème avec le transfert de métadonnées du firmware
+ Installation complète du firmware
+ Installation complète du firmware, redémarrage de l\'appareil
+ Échec lors de l\'écriture du firmware
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5ee3c13a1..a76853691 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -8,7 +8,7 @@
QuitSynchronizeSleep Monitor (ALPHA)
- Find Device…
+ Find lost Device…Take ScreenshotDisconnect
@@ -86,7 +86,7 @@
Stop ScanningStart Discovery
- Discover Device
+ Connect new Device%1$s (%2$s)Pair DeviceUse the Android Bluetooth Pairing dialog to pair the device.
diff --git a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/service/TestDeviceSupport.java b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/service/TestDeviceSupport.java
index b0abafec0..443a72fa3 100644
--- a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/service/TestDeviceSupport.java
+++ b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/service/TestDeviceSupport.java
@@ -58,8 +58,8 @@ public class TestDeviceSupport extends AbstractDeviceSupport {
}
@Override
- public void onGenericNotification(String title, String details) {
-
+ public void onGenericNotification(String title, String details, int handle) {
+
}
@Override