1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-29 00:10:26 +02:00
Commit Graph

284 Commits

Author SHA1 Message Date
Daniele Gobbetti
371a7bb4af Get rid of the Checkedtextview because they weren't in line with the our style 2015-06-30 06:40:46 +02:00
Daniele Gobbetti
900511760c further improvements:
- the day of week are evenly spread across the screen in the alarms detail activity
- the alarms are stored in a single shared preference (as a set) NB: you'll have to reset your alarms if you used a previous version (and also manually clean the shared preferences, but this is not needed)
- the list of alarms gets correctly updated after editing a specific alarm
- the actionbar back button saves the alarm status, the device back button doesn't. I'm not sure if it's a bug or a feature :)
2015-06-30 06:40:46 +02:00
Daniele Gobbetti
109b2bef4d add a Toast to confirm the transfer of the alarm or to warn if the transfer wasn't possible. 2015-06-30 06:40:46 +02:00
Daniele Gobbetti
dc3ed1659c use parcelable for passing alarms around 2015-06-30 06:40:46 +02:00
Daniele Gobbetti
764dd70e45 low hanging fruits:
- add break after case
- center vertically the smart wakeup checkbox
2015-06-30 06:40:46 +02:00
Daniele Gobbetti
1caca1439a Initial implementation of setting alarms to the Mi Band.
The code basically works, but there a lot of things to fix / improve.
* The alarms are stored to and read from the Shared Preferences, but there is no persistence within the app (basically they are read and stored at every access)
* The alarm list is not updated when coming back from the alarm detail view (probably related to the point above), but the actual alarm is
* The alarms preference names is sometimes built by concatenating strings, which is not really safe
* There is no check in the alarm constructor whether the stored string is a valid alarm representation
* Even though only 3 alarms can be stored on the device, we could have more in the app and let the user choose which to sync
* In the alarm detail view XML some material* drawables are used, it's possible that these break on android version < 5
* ...
2015-06-30 06:40:14 +02:00
Andreas Shimokawa
c16510003c Open image viewer when tapping on screenshot 2015-06-27 00:21:30 +02:00
Andreas Shimokawa
44636748e7 Show screenshot in notification in successful 2015-06-26 23:17:31 +02:00
Andreas Shimokawa
a73d8b7f0a Pebble: save screenshots as 1bit Windows 3.x BMP
TODO:
- user feedback
- support Pebble Time
2015-06-25 23:34:50 +02:00
Andreas Shimokawa
d0178686d8 Pebble: support for taking screenshots (do not get displayed/written anywhere yet) 2015-06-24 23:55:51 +02:00
Andreas Shimokawa
07d59322bd Pebble: Preparations for taking screenshots
This commit also includes some cleanups and removal of unused code/strings
2015-06-24 00:23:38 +02:00
cpfeiffer
4b241ca9eb Initial work on supporting multiple charts.
- one fragment per chart screen
- common chart code should move to fragment baseclass and the host
  Activity (ChartsActivity)

Currently it's not used, change ControlCenter to invoke ChartsActivity
instead of SleepChartActivity to test it.

WIP for #79
2015-06-23 23:03:05 +02:00
Andreas Shimokawa
5ae812c854 add GBDeviceProtocol again 2015-06-23 14:20:13 +02:00
Andreas Shimokawa
73da7fff0a Refactoring: rename GBDeviceCommand to GBDeviceEvent 2015-06-23 11:54:33 +02:00
Andreas Shimokawa
c2582e1e1f Not not display useless menu items when device is not connected
Also remove "fetch activity data" from pebble context menu, which currently does nothing

Closes #75
2015-06-22 22:16:19 +02:00
Andreas Shimokawa
1bd32b713a Pebble: implement encodeFindDevice() by simulating a call 2015-06-21 23:53:23 +02:00
cpfeiffer
39db968e34 Forgot to rename that method, too (#42) 2015-06-21 20:59:36 +02:00
cpfeiffer
23d91ac79e Support for finding a lost device (closes #42) 2015-06-21 19:46:02 +02:00
cpfeiffer
c7b4f295a1 Support for vibration profiles, configurable for notifications
Configurable for sms, k9, incoming calls, pebble messages, generic
notifications.

Color is unfortunately not configurable so far, see #37

Closes #29

Currently provided profiles are
- staccato
- short
- medium
- long
- waterdrop
- ring
- alarm clock
2015-06-21 19:46:01 +02:00
cpfeiffer
f105bbbde3 Avoid crash when getExternelDir() returns null (huh!) 2015-06-21 19:44:56 +02:00
cpfeiffer
1fb20926b3 Fix previous commit, disable LimitLines for this release 2015-06-21 19:43:45 +02:00
Andreas Shimokawa
b1973994f0 Sleep Monitor: Disable anotations for now (produces unreadable output on some devices) 2015-06-21 16:39:03 +02:00
Andreas Shimokawa
2458e55865 Pebble: add encodeSimpleMessage() for encoding 1 byte messages to endpoints 2015-06-19 23:54:31 +02:00
Andreas Shimokawa
7e1700250f Pebble: add dev option to force latest notification protocol usage
When enabled it forces to use 3.x notifications on FW 3.x (2.x notifcations on FW 2.x)
When disabled 2.x notification on FW 2.x and 1.x notifications on FW 2.x are used (which is recommended)

This allows Pebble Time users to do further tests.
2015-06-19 12:34:33 +02:00
cpfeiffer
e562fa9870 Light sleep and deep sleep was mixed up. Corrected graphs again. #45
Use dashed limit lines, still not perfect.
2015-06-19 01:14:58 +02:00
cpfeiffer
f9e5ab5fc1 Some more refinements to sleep display (#45):
- display the recorded level of deep sleep rather than a constant
  (I hope this works for morpheuz, too!?)
- give light sleep a minimum value, because it's sometimes 0 for Mi Band
2015-06-19 00:20:38 +02:00
cpfeiffer
03fa05756e As a test, draw limit lines for sleep/activity changes.
Unfortunately it looks like the labels for it don't get rendered ;-(
2015-06-18 23:41:54 +02:00
cpfeiffer
83079b0456 Stub for device notification changes 2015-06-18 23:07:22 +02:00
Daniele Gobbetti
cb3be26349 Do something when we receive a CharacteristicChanged message
on the UUID_CHARACTERISTIC_BATTERY characteristic.

This is a first try at addressing #71

Please note that this will probably not work at this point, but it's
worth a try. To make it work probably we have to tell the device to
send updates, and we don't know how to do it.
2015-06-18 22:17:41 +02:00
Andreas Shimokawa
1801a679c5 Pebble: fix FW 3.x detection 2015-06-18 18:39:32 +02:00
Andreas Shimokawa
bffd7f332f remove SleepChartActivityOld, as the new one is usable now ;) 2015-06-17 08:18:24 +02:00
cpfeiffer
a5ae7acc63 Improved sleep chart #45
- use just one data set, because multiple data sets is not supported
  by MPAndroidChart (the way we need it)

Now there is hardly any space between the bars anymore

Also:
- allow scaling x and y axis independently via pinch gesture
- set fixed y max value (1.0) so that the display is stable and
  independent of the actual available data
- (at least temporarily) display y labels
2015-06-17 07:03:50 +02:00
cpfeiffer
8709b95a95 Use a single data set instead of one per activity kind
The reason is that multiple data sets will always be grouped.
If we add null values to fix the grouping issue, we will still have
space between the bars.
2015-06-17 07:03:50 +02:00
Andreas Shimokawa
a07aed62ad Pebble: Experiment with 3.x compatible notifications
This will most probably not work, but please test if you can ;)
2015-06-16 23:15:51 +02:00
Andreas Shimokawa
70c021e92c SleepChartActivity: Make light sleep color brighter 2015-06-13 20:47:36 +02:00
Andreas Shimokawa
73187431b2 Use old Sleep Monitor Activity for Pebble/Morpheuz
The new one does not look good with Morpheuz data yet (samples every 10 minutes)
2015-06-13 20:37:53 +02:00
Andreas Shimokawa
d2f7169de4 Really, I see no reason to look up a string for a preference key in an xml file
If we have to use a key to lookup the string for the key, we can just use that key as the preference key.
2015-06-13 01:12:08 +02:00
Andreas Shimokawa
56d314d054 Reformat code and optimize imports 2015-06-13 00:32:48 +02:00
Andreas Shimokawa
ad4f708140 Send 2.x style notifications when on FW 3.x (on FW 2.x else use 1.x style notifications)
This could improve #24. Unfortunally I cannot test it since I have no Pebble Time.
2015-06-13 00:26:55 +02:00
Daniele Gobbetti
ac7e21be48 Remove the activity log debug file.
This partially reverts commit 8b268a676c
2015-06-12 22:30:14 +02:00
Daniele Gobbetti
376f9c53a0 Fix crash on startup
Fixed a typo that was causing a force close on database creation.
2015-06-12 21:26:11 +02:00
Daniele Gobbetti
75de3b21e1 Use colors that are easier on the eyes
Changed the colors of the Deep-/Light Sleep and Activity datasets.
* Deep sleep has been used as basic color,
* Light sleep is a color that is monochromatically analogous
* Activity is a color triadic to the basic one
2015-06-12 11:17:44 +02:00
cpfeiffer
8aef92026c A new sleep chart based on MPAndroidChart 45
- supports zooming an panning
- displays labels for all x-values (= time of day)
- fix deep vs. light sleep constants
- increase activity data buffer size for Mi Band
2015-06-11 23:37:00 +02:00
Andreas Shimokawa
9051e10aad switch constants for deep sleep and light sleep to match native miband data 2015-06-11 23:00:59 +02:00
Andreas Shimokawa
dfcad94c2c Pebble: Make firmware installation possible from recovery (Closes #54)
Also make HW revision displayable for Pebble Time.
2015-06-11 20:40:31 +02:00
cpfeiffer
d0b9914770 Keep the db open while adding samples 2015-06-09 21:05:44 +02:00
cpfeiffer
e78e79a9a9 Added missing returns.. 2015-06-08 23:31:12 +02:00
Andreas Shimokawa
efac912929 Pebble: Fix error when reinstalling apps, useful for upgrading/downgrading
Fixes #65
2015-06-08 22:38:58 +02:00
Andreas Shimokawa
4f8a7ea64d Misuse device_candidate_item insead of device_item for AppManager 2015-06-07 22:02:40 +02:00
Andreas Shimokawa
c98716d469 Morpheuz support: Fix 3.1 compatibility 2015-06-07 21:49:05 +02:00