diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fec508c..82c8ebdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,52 @@ ###Changelog +####Version 0.15.0 +* New device: Liveview +* Liveview: initial support (set the time and receive notifications) +* Pebble: log pebble app logs if option is enabled in pebble development settings +* Pebble: notification icons for more apps +* Pebble: Further improve compatibility for watchface configuration +* Mi Band 2: Initial support for firmware update (tested so far: 1.0.0.39) + +####Version 0.14.4 +* Pebble 2/LE: Fix multiple bugs in reconnection code, honor reconnect tries from settings +* Mi Band 2: Experimental support for activity recognition +* Mi Band 2: Fix time setting code + +####Version 0.14.3 +* Pebble: Experimental support for pairing and using all Pebble models via BLE +* Mi Band 1: Fix regression causing display of wrong activity data (#440) +* Mi Band 2: Support for continuous heart rate measurements in live activity view + +####Version 0.14.2 +* Pebble 2: Fix a bug where the Pebble got disconnected by other unrelated LE devices + +####Version 0.14.1 +* Mi Band 2: Initial experimental support for activity data +* Mi Band 2: Send the fitness goal (steps) to the band +* Pebble 2: Work around firmware installation issues (tested with upgrading 4.2 to 4.3) +* Pebble: Further improve compatibility for watchface configuration +* Pebble: add Kickstart watch face to app manager on FW 4.x +* Charts: display the total time range, not just the range with available data + +####Version 0.14.0 +* Pebble 2: Initial experimental support for P2/PT2 using BLE +* Pebble: Special support in device discovery activity (MUST be used to get Pebble 2 working) +* Pebble: Improve compatibility for watchface configuration +* Mi Band 2: support for heart rate measurement during sleep +* Mi Band 2: configuration option to activate the display on lift +* Mi Band 2: configuration option to display the time + date or just the time +* Mi Band 2: honor the wear location configuration option + +####Version 0.13.9 +* Pebble: use the last known location for setting sunrise and sunset +* Pebble: fix Health disappearing forever when deactivating through app manager (and get it back for affected users) +* Mi Band 2: More fixes for connection issues (#408) + +####Version 0.13.8 +* Mi Band 2: fix connection issues for users of Mi Fit (#408, #425) +* Mi Band 1A: fix firmware update for certain 1A models + ####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 @@ -25,7 +72,7 @@ * Possibly fix logging to file on certain devices (#406) * Mi Band 2: Possibly fix weird connection interdependency between Mi 1 and 2 (#323) * Mi Band 1S: Whitelist firmware 4.16.4.22 -* Mi Band: try application level pairing again, in ordert to support data sharing with Mi Fit (#250) +* Mi Band: try application level pairing again, in order to support data sharing with Mi Fit (#250) * Pebble: new icons and colours for certain apps * Debug-screen: added button to test "new functionality", currently live sensor data for Mi Band 1 @@ -56,7 +103,7 @@ ####Version 0.12.1 (release withdrawn) * Pebble: Fix activity data being associated with the wrong device and/or user in some cases causing them to invisible in charts -* Remove special handling for Conversations notfications since upstream dropped special pebble support +* Remove special handling for Conversations notifications since upstream dropped special pebble support ####Version 0.12.0 (release withdrawn) * NB: User action needed to migrate existing data! @@ -73,13 +120,13 @@ ####Version 0.11.1 * Various fixes (including crashes) for location settings * Pebble: Support Pebble Time 2 emulator (needs recompilation of Gadgetbridge) -* Fix a rare crash when, due to bluetooth problems, when a device has no name +* Fix a rare crash when, due to Bluetooth problems, when a device has no name * Fix activity fetching getting stuck when double tapping (#333) * Mi Band: in the Device Discovery activity, do not display devices that are already paired * Mi Band: only allow automatic reconnection on disconnect when the device was previously fully connected -* Mi Band: fix a rare crash when reading data fails due to bluetooth problems +* Mi Band: fix a rare crash when reading data fails due to Bluetooth problems * Mi Band: log full activity sample to help deciphering activity kinds (#341) -* Mi Band 2: improved discovery mechanism to not rely on mac addresses (#323) +* Mi Band 2: improved discovery mechanism to not rely on MAC addresses (#323) * Charts: only display heart rate samples on devices that support that * Add more logging to detect problems with external directories (#343) @@ -92,13 +139,13 @@ ####Version 0.10.2 * Pebble: allow to manually paste configuration data for legacy configuration pages * Pebble: various improvements to the configuration page -* Pebble: Suppport FW 4.0-dp1 and Pebble2 emulator (needs recompilation of Gadgetbridge) +* Pebble: Support FW 4.0-dp1 and Pebble2 emulator (needs recompilation of Gadgetbridge) * Pebble: Fix a problem with key events when using the Pebble music player ####Version 0.10.1 * Pebble: set extended music info by dissecting notifications on Android 5.0+ -* Pebble: various other improvemnts to music playback -* Pebble: allow ignoring activity trackers indiviually (to keep the data on the pebble) +* Pebble: various other improvements to music playback +* Pebble: allow ignoring activity trackers individually (to keep the data on the pebble) * Mi Band: support for shifting the device time by N hours (for people who sleep at daytime) * Mi Band: initial and untested support for Mi Band 2 * Allow setting the application language @@ -107,12 +154,12 @@ * Pebble: option to send sunrise and sunset events to timeline * Pebble: fix problems with unknown app keys while configuring watchfaces * Mi Band: BLE connection fixes -* Fixes for enabling logging at whithout restarting Gadgetbridge +* Fixes for enabling logging at without restarting Gadgetbridge * Re-enable device paring activity on Android 6 (BLE scanning needs the location preference) * Display device address in device info ####Version 0.9.8 -* Pebble: fix more reconnnect issues +* Pebble: fix more reconnect issues * Pebble: fix deep sleep not being detected with Firmware 3.12 when using Pebble Health * Pebble: option in AppManager to delete files from cache * Pebble: enable pbw cache and watchface configuration for Firmware 2.x @@ -124,7 +171,7 @@ * Pebble: hopefully fix some reconnect issues * Mi Band: fix live activity monitoring running forever if back button pressed * Mi Band: allow low latency firmware updates, fixes update with some phones -* Mi Band: inital experimental and probably broken support for Amazfit +* Mi Band: initial experimental and probably broken support for Amazfit * Show aliases for BT Devices if they had been renamed in BT Settings * Do not show a hint about App Manager when a Mi Band is connected @@ -206,7 +253,7 @@ ####Version 0.7.4 * Refactored the settings activity: User details are now generic instead of miband specific. Old settings are preserved. * Pebble: Fix regression with broken active reconnect since 0.7.0 -* Pebble: Support activation and deactivation of Pebble Health. Activation uses the User details as seen above. Insigths are NOT activated. +* Pebble: Support activation and deactivation of Pebble Health. Activation uses the User details as seen above. Insights are NOT activated. Please be aware that deactivation does NOT delete the data stored on the watch (but it seems to stop the tracking), and we do not know how to switch to metric length units. ####Version 0.7.3 @@ -215,7 +262,7 @@ ####Version 0.7.2 * Pebble: Allow replying to generic notifications that contain a wearable reply action (tested with Signal) -* Pebble: Support seting up a common suffix for canned replies (defaults to " (canned reply)") +* Pebble: Support setting up a common suffix for canned replies (defaults to " (canned reply)") * Mi Band: Avoid NPEs when aborting an erroneous sync #205 * Mi Band: Fix discovery of Mi Band 1S * Add a confirmation dialog when performing a db import @@ -232,7 +279,7 @@ * Pebble: Allow installing apps compiled with SDK 2.x also on the basalt platform (Time, Time Steel) * Pebble: Fix decoding strings in appmessages from the pebble (fixes sending SMS from "Dialer for Pebble") * Pebble: Support incoming reconnections when device returns from "Airplane Mode" or "Stand-By Mode" -* Pebble: Fix crash when turning off bluetooth when connected on Android 6.0 +* Pebble: Fix crash when turning off Bluetooth when connected on Android 6.0 * Mi Band: reserve some alarm slots for alerting when upcoming events begin. NB: the band will vibrate at the start time of the event, android reminders are ignored * Mi Band: Display unique devices Names, not just "MI" * Some new and updated icons @@ -256,7 +303,7 @@ * Pebble: fix installation of pbw files on firmware 3.x when using content providers (eg. download manager) * Pebble: fix crash on firmware 3.x when pebble requests a pbw that is not in Gadgetbridge's cache + Treat Signal notifications as chat notifications -* Fix crash when contacts cannot be read on Android 6.0 (non-granted pemissions) +* Fix crash when contacts cannot be read on Android 6.0 (non-granted permissions) ####Version 0.6.7 * Pebble: Allow installation of 3.x apps on OG Pebble (FW will be released soon) @@ -290,7 +337,7 @@ * Try to prevent service being killed by disallowing backups ####Version 0.6.2 -* Mi Band: support firmare versione 1.0.10.14 (and onwards?) vibration +* Mi Band: support firmware version 1.0.10.14 (and onwards?) vibration * Mi Band: get device name from official BT SIG endpoint * Mi Band: initial support for displaying live activity data, screen stays on @@ -302,11 +349,11 @@ * Bugfix for app blacklist (some checkboxes where wrongly drawn as checked) ####Version 0.6.0 -* Pebble: WIP implementantion of PebbleKit Intents to make some 3rd party Android apps work with the Pebble (eg. Ventoo) +* Pebble: WIP implementation of PebbleKit Intents to make some 3rd party Android apps work with the Pebble (eg. Ventoo) * Pebble: Option to set reconnection attempts in settings (one attempt usually takes about 5 seconds) -* Support contolling all audio players that react to media buttons (can be chosen in settings) +* Support controlling all audio players that react to media buttons (can be chosen in settings) * Treat SMS as generic notification if set to "never" (can be blacklisted there also if desired) -* Treat Conversations messagess as chat messages, even if arrived via Pebble Intents (nice icon for Pebble FW 3.x) +* Treat Conversations messages as chat messages, even if arrived via Pebble Intents (nice icon for Pebble FW 3.x) * Allow opening firmware / app files from the download manager "app" (technically a content provider) * Mi Band: whitelisted a few firmware versions @@ -330,7 +377,7 @@ * Graphs are now using the same theme as the rest of the application * Graphs now show when the device was not worn by the user (for devices that send this information) * Remove unused settings option in charts view -* Build target is now Android SDK 23 (Marshmellow) +* Build target is now Android SDK 23 (Marshmallow) ####Version 0.5.1 * Pebble: support taking screenshot from Pebble Time @@ -343,7 +390,7 @@ * Pebble: use SMS/EMAIL icons for FW 3.x/Pebble Time * Pebble: do not throttle notifications * Support going forward/backwards in time in the activity charts -* Various small bugfixes to the App/Fw Installation Activity +* Various small bugfixes to the App/FW Installation Activity ####Version 0.4.6 * Mi Band: Fixed negative number of steps displayed (#91) @@ -358,13 +405,13 @@ ####Version 0.4.5 * Enhancement to activity graphs: new graph showing the number of steps done today and in the last week * New preference to set the desired fitness goal (number of steps to walk in one day) -* Mi Band: support for setting the fitness goal (the band will show the progress to the goal with the leds and vibrates when the goal is reached) +* Mi Band: support for setting the fitness goal (the band will show the progress to the goal with the LEDs and vibrates when the goal is reached) * Mi Band: send the wear location (left / right hand) to the device * Mi Band: support for flashing firmware from .fw files (upgrades and downgrades are possible) * Fixed crash when synchronizing activity data in the graphs activity and changing device orientation ####Version 0.4.4 -* Set GadgetBridge notification visibility to public, to show the connection status on the lockscreen +* Set Gadgetbridge notification visibility to public, to show the connection status on the lockscreen * Support for backup up and restoring of the activity database (via Debug activity) * Support for graceful upgrades and downgrades, keeping your activity database intact * Enhancement to activity graphs: new graphs for sleep data (only last night) accessible swiping right from the main graph @@ -441,7 +488,7 @@ ####Version 0.2.0 * Experimental pbw installation support (watchfaces/apps) * New icons for device and app lists -* Fix for device list not refreshing when bluetooth gets turned on +* Fix for device list not refreshing when Bluetooth gets turned on * Filter out annoying low battery notifications * Fix for crash on some devices when creating a debug notification * Lots of internal changes preparing multi device support @@ -464,8 +511,8 @@ * Remove quit button from the service notification, put a quit item in the context menu instead ####Version 0.1.2 -* Added option to start Gadgetbridge and connect automatically when bluetooth is turned on -* stop service if bluetooth is turned off +* Added option to start Gadgetbridge and connect automatically when Bluetooth is turned on +* stop service if Bluetooth is turned off * try to reconnect if connection was lost ####Version 0.1.1 diff --git a/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java b/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java index 9a834ca4..63e5d713 100644 --- a/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java +++ b/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java @@ -26,26 +26,32 @@ import de.greenrobot.daogenerator.Schema; */ public class GBDaoGenerator { - public static final String VALID_FROM_UTC = "validFromUTC"; - public static final String VALID_TO_UTC = "validToUTC"; + private static final String VALID_FROM_UTC = "validFromUTC"; + private static final String VALID_TO_UTC = "validToUTC"; private static final String MAIN_PACKAGE = "nodomain.freeyourgadget.gadgetbridge"; private static final String MODEL_PACKAGE = MAIN_PACKAGE + ".model"; private static final String VALID_BY_DATE = MODEL_PACKAGE + ".ValidByDate"; private static final String OVERRIDE = "@Override"; - public static final String SAMPLE_RAW_INTENSITY = "rawIntensity"; - public static final String SAMPLE_STEPS = "steps"; - public static final String SAMPLE_RAW_KIND = "rawKind"; - public static final String TIMESTAMP_FROM = "timestampFrom"; - public static final String TIMESTAMP_TO = "timestampTo"; + private static final String SAMPLE_RAW_INTENSITY = "rawIntensity"; + private static final String SAMPLE_STEPS = "steps"; + private static final String SAMPLE_RAW_KIND = "rawKind"; + private static final String SAMPLE_HEART_RATE = "heartRate"; + private static final String TIMESTAMP_FROM = "timestampFrom"; + private static final String TIMESTAMP_TO = "timestampTo"; public static void main(String[] args) throws Exception { - Schema schema = new Schema(13, MAIN_PACKAGE + ".entities"); + Schema schema = new Schema(15, MAIN_PACKAGE + ".entities"); Entity userAttributes = addUserAttributes(schema); Entity user = addUserInfo(schema, userAttributes); Entity deviceAttributes = addDeviceAttributes(schema); Entity device = addDevice(schema, deviceAttributes); + + // yeah deep shit, has to be here (after device) for db upgrade and column order + // because addDevice adds a property to deviceAttributes also.... + deviceAttributes.addStringProperty("volatileIdentifier"); + Entity tag = addTag(schema); Entity userDefinedActivityOverlay = addActivityDescription(schema, tag, user); @@ -172,7 +178,7 @@ public class GBDaoGenerator { } private static void addHeartRateProperties(Entity activitySample) { - activitySample.addIntProperty("heartRate").notNull().codeBeforeGetterAndSetter(OVERRIDE); + activitySample.addIntProperty(SAMPLE_HEART_RATE).notNull().codeBeforeGetterAndSetter(OVERRIDE); } private static Entity addPebbleHealthActivitySample(Schema schema, Entity user, Entity device) { @@ -181,6 +187,7 @@ public class GBDaoGenerator { activitySample.addByteArrayProperty("rawPebbleHealthData").codeBeforeGetter(OVERRIDE); activitySample.addIntProperty(SAMPLE_RAW_INTENSITY).notNull().codeBeforeGetterAndSetter(OVERRIDE); activitySample.addIntProperty(SAMPLE_STEPS).notNull().codeBeforeGetterAndSetter(OVERRIDE); + addHeartRateProperties(activitySample); return activitySample; } diff --git a/README.md b/README.md index c54814c6..85dd7da0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Gadgetbridge ============ -Gadgetbridge is an Android (4.4+) Application which will allow you to use your +Gadgetbridge is an Android (4.4+) application which will allow you to use your Pebble or Mi Band without the vendor's closed source application and without the need to create an account and transmit any of your data to the vendor's servers. @@ -15,12 +15,11 @@ need to create an account and transmit any of your data to the vendor's servers. ## Supported Devices * Pebble, Pebble Steel, Pebble Time, Pebble Time Steel, Pebble Time Round +* Pebble 2, Pebble Time 2 (experimental, PAIR WITHIN GADGETBRIDGE) * Mi Band, Mi Band 1A, Mi Band 1S -* Mi Band 2 (only notifications) +* Mi Band 2 * Vibratissimo (experimental) - -***THE PEBBLE 2 AND PEBBLE TIME 2 ARE CURRENTLY NOT SUPPORTED. ADDING SUPPORT IS HIGH-PRIORITY BUT WE CANNOT GIVE YOU AN ETA!*** - +* Liveview ## Features (Pebble) @@ -31,7 +30,7 @@ need to create an account and transmit any of your data to the vendor's servers. * K-9 Mail notification support * Support for generic notifications (above filtered out) * Support for up to 16 predefined replies for SMS and Android Wear compatible notifications (experimental, tested with Signal) -* Dismiss individial notifications, mute or open corresponding app on phone from the action menu (generic notifications) +* Dismiss individual notifications, mute 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) * Music control: play/pause, next track, previous track, volume up, volume down @@ -50,44 +49,62 @@ need to create an account and transmit any of your data to the vendor's servers. ## Getting Started (Pebble) -1. Pair your Pebble through the Android's Bluetooth Settings +1. Pair your Pebble through the Android's Bluetooth Settings or Gadgetbridge. Pebble 2 MUST be paired though Gadgetbridge (tap on the + in Control Center) 2. Start Gadgetbridge, tap on the device you want to connect to 3. To test, choose "Debug" from the menu and play around For more information read [this wiki article](https://github.com/Freeyourgadget/Gadgetbridge/wiki/Pebble-Getting-Started) -## Features (Mi Band) +## Features (Mi Band 1x) -* Mi Band notifications (LEDs + vibration) for - * Discovery and pairing +* Discovery and pairing +* Mi Band notifications (LEDs + vibration) for +* Display live activity data (alpha) * Incoming calls * SMS received * K-9 mails received + * Conversations messages * Generic Android notifications * Synchronize the time to the Mi Band * Display firmware version and battery state -* Firmware Update -* Heartrate Measurement (alpha) +* Firmware update +* Heart rate measurement on demand and during sleep * Synchronize activity data * Display sleep data (alpha) * Display sports data (step count) (alpha) * Display live activity data (alpha) * Set alarms on the Mi Band -## How to use (Mi Band) +## Features (Mi Band 2) -* When starting Gadgetbridge and no device is visible, it will automatically - attempt to discover and pair your Mi Band. Alternatively you can invoke this - manually via the menu button. It will ask you for some personal info that appears +* Discovery and pairing +* Mi Band notifications (Display + vibration) for + * Incoming calls + * SMS received + * K-9 mails received + * Conversations messages + * Generic Android notifications +* Synchronize the time to the Mi Band 2 +* Display firmware version +* Firmware update (beta) +* Heart rate measurement on demand and during sleep +* Synchronize activity data (alpha) +* Set alarms on the Mi Band 2 + +## How to use (Mi Band 1+2) + +* When starting Gadgetbridge the first time, it will automatically + attempt to discover and pair your Mi Band. Alternatively you can invoke discovery + manually via the "+" button. It will ask you for some personal info that appears to be needed for proper steps calculation on the band. If you do not provide these, some hardcoded default "dummy" values will be used instead. - When your Mi Band starts to vibrate and blink with all three LEDs during the pairing process, + When your Mi Band starts to vibrate and blink during the pairing process, tap it quickly a few times in a row to confirm the pairing with the band. 1. Configure other notifications as desired -2. Go back to the "Gadgetbridge" Activity -3. Tap the "MI" item to connect if you're not connected yet. +2. Go back to the "Gadgetbridge" activity +3. Tap the Mi Band item to connect if you're not connected yet 4. To test, chose "Debug" from the menu and play around Known Issues: @@ -95,6 +112,14 @@ Known Issues: * The initial connection to a Mi Band sometimes takes a little patience. Try to connect a few times, wait, and try connecting again. This only happens until you have "bonded" with the Mi Band, i.e. until it knows your MAC address. This behavior may also only occur with older firmware versions. +* If you use other apps like Mi Fit, and "bonding" with Gadgetbridge does not work, please + try to unpair the band in the other app and try again with Gadgetbridge. + + +## Features (Liveview) + +* set time (automatically upon connection) +* display notifications and vibrate ## Authors (in order of first code contribution) @@ -114,10 +139,9 @@ Translations can be contributed via https://www.transifex.com/projects/p/gadgetb Feel free to open an issue on our issue tracker, but please: - do not use the issue tracker as a forum, do not ask for ETAs and read the issue conversation before posting -- use the search functionality to ensure that your questions wasn't already answered. Don't forget to check the **closed** issues as well! +- use the search functionality to ensure that your question wasn't already answered. Don't forget to check the **closed** issues as well! - remember that this is a community project, people are contributing in their free time because they like doing so: don't take the fun away! Be kind and constructive. - ## Having problems? 1. Open Gadgetbridge's settings and check the option to write log files diff --git a/app/build.gradle b/app/build.gradle index 23df6ee1..1c399d7c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -26,8 +26,8 @@ android { targetSdkVersion 23 // note: always bump BOTH versionCode and versionName! - versionName "0.13.7" - versionCode 69 + versionName "0.15.0" + versionCode 77 vectorDrawables.useSupportLibrary = true } @@ -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:v3.0.0' + compile 'com.github.PhilJay:MPAndroidChart:v3.0.1' 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 78c008ba..6804977e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -174,7 +174,7 @@ - + @@ -182,7 +182,7 @@ - + @@ -256,6 +256,9 @@ +
-

Url of the configuration:

+

URL of the configuration:

-

In case of "network error" after saving settings in the watchhapp, copy the "network error" +

In case of "network error" after saving settings in the watchapp, copy the "network error" URL and paste it here: