Commit Graph

136 Commits (962720145e3678f5ffd17ea6c4a9e277a665b144)

Author SHA1 Message Date
cpfeiffer 558c9e4664 Fiix visal glitch in weeksteps chart (first and last bar only partly visible) 2016-10-07 21:46:00 +02:00
cpfeiffer e5d178b315 Fix crash with mpandroidchart 3.0pre (master) 2016-10-04 23:39:14 +02:00
cpfeiffer 75bca1b924 Update to latest master in mpac and fix labels for sleep chart as well 2016-10-04 00:09:56 +02:00
cpfeiffer f35f76a42b Fix extraneous space at the bottom of the week steps chart 2016-10-04 00:04:04 +02:00
cpfeiffer eccf9164f6 No need to have a separate xLabelsFormatter 2016-10-03 23:48:32 +02:00
cpfeiffer dee492bc4f Fixes regarding xlabels -- must set them at the correct point in time
(otherwise we get ArrayIndexOutOfBoundsException when the chart
refreshes and the wrong xLabels, potentially with fewer entries are used)
2016-10-03 23:36:04 +02:00
cpfeiffer 827c99f620 Fix weekday charts, closes #403 2016-10-03 22:42:25 +02:00
cpfeiffer dd590528dc Add back the x-labels 2016-10-03 21:53:06 +02:00
cpfeiffer fbfc9ed97f Workaround for https://github.com/PhilJay/MPAndroidChart/issues/2317 2016-09-29 22:45:17 +02:00
cpfeiffer f58b1f33c6 Fix parameter order for mpandroidchart 3.0 2016-09-29 22:45:17 +02:00
cpfeiffer 1b5bc23981 Initial port to mpandroidchart 3.0
does not quite work yet
2016-09-29 22:45:17 +02:00
Andreas Shimokawa 9520e23439 fix negative steps in Charts with Morpheuz 2016-08-02 00:31:29 +02:00
Andreas Shimokawa 8ea29e6e1d Refactor database / sample access (#206)
We now have separate tables for each provider's samples but a common interface.
2016-07-27 23:34:13 +02:00
cpfeiffer f0da25c49b Fix activity fetching getting stuck when double tapping #333 2016-06-28 23:07:24 +02:00
cpfeiffer e70a2290c3 sampleproviders now return device specific data #206 2016-06-27 20:43:48 +02:00
cpfeiffer 45fa930ac3 Properly check support for heartrate measurements 2016-06-19 23:22:28 +02:00
cpfeiffer 41e6833b2d Getting closer... db migration almost works. 2016-06-18 01:26:36 +02:00
cpfeiffer 687beee501 Migration work 2016-06-16 21:54:53 +02:00
cpfeiffer 876bdac918 More WIP: remove now unused code, better use of generics 2016-05-16 23:36:54 +02:00
cpfeiffer 40a376bbd0 Merge branch 'master' into db-refactoring 2016-05-16 23:01:16 +02:00
cpfeiffer 3e0bc16741 More WIP, but we're getting closer
current state:
- storing samples works (tested only mi band)
- charts work
2016-05-16 23:00:04 +02:00
Andreas Shimokawa d66f842e9b Mi Band: Make sure live activity gets stopped when using the back button 2016-05-15 22:24:37 +02:00
cpfeiffer 8ca821ab8a More WIP on db refactoring 2016-05-13 23:47:47 +02:00
Andreas Shimokawa 3fefb57fdd Fix colors in alarm activity for dark theme 2016-04-23 23:24:56 +02:00
Andreas Shimokawa a9e7cdcaa7 use some colors from the theme for charts activity 2016-04-14 17:41:04 +02:00
Andreas Shimokawa 4bcebca744 Work towards dark theme, remove -v21 specific theme definition 2016-04-14 15:21:25 +02:00
cpfeiffer b25a47c398 Immediately disable hr reading and activity tracking when leaving the tab #273 2016-04-13 23:36:14 +02:00
cpfeiffer e87a357bed Show separate curves when the time between two measurements is too long #273 2016-04-13 21:38:35 +02:00
cpfeiffer ae5d9089d8 Slight improvement to hr charts #178 2016-04-13 21:21:10 +02:00
cpfeiffer f15a97d994 Initial live heartrate measurement in the live activity tab #178 2016-04-12 23:12:50 +02:00
cpfeiffer 7ab31514dc Rework charts to completely fix crash in charts activity #277 2016-04-11 23:18:12 +02:00
cpfeiffer 42dda911e4 Fix crash in charts activity, closes #277 2016-04-08 23:02:50 +02:00
cpfeiffer 403f74e59b Enable heart rate charts #232
(And fix some charting issues)
2016-04-04 23:05:20 +02:00
Andreas Shimokawa 4be1926459 reformat code though Android Studio 2016-03-20 15:00:05 +01:00
cpfeiffer a96120f91d Clear the chart when there are no samples
(e.g. when switching to another day for which no samples are
available, the chart now becomes empty instead of displaying the
samples from the last day with data.
2016-03-07 23:17:02 +01:00
cpfeiffer 25e58eb414 Upgrade mpandroidchart to 2.2.3 2016-03-07 22:46:03 +01:00
Andreas Shimokawa ed85fd5011 convert byte and short values related to activity tracking to int
This avoids a lot of problems because java
- does not know unsigned values
- jvm and dalvic do not internally support byte and short
- sqlite does not know them either
2016-02-29 20:54:39 +01:00
cpfeiffer 3ff31cd73b Disable heartrate in charts fow now, fix notification for manual hr 2016-02-27 23:18:44 +01:00
cpfeiffer d6dfc3b6ec Fix some ClassCastExceptions in charts since switching to CombinedChart 2016-02-27 15:30:46 +01:00
cpfeiffer de6f898fef Some more fixes regarding heart rate measurement #178 2016-02-27 11:18:16 +01:00
cpfeiffer 0ef738067d Some work in progress for heart rate graphs #178
Currently we get the heart rate when synchronizing activity data
(i.e. not live) and we write it to the activity database so that we
can show a nice graph. The value is currently always 0 though,
because we can't enable recording hr, yet.
2016-02-26 23:45:17 +01:00
cpfeiffer 159c187e5e On Quit, remove all pending notifications
At least the notifications from #141 don't stay there forever, then.
2015-12-08 21:48:56 +01:00
cpfeiffer bd0716ba58 Some more lint warnings fixed 2015-11-23 23:04:46 +01:00
cpfeiffer 81c2f657bd Some lint fixes 2015-11-23 22:46:12 +01:00
cpfeiffer ebbb71ae9d Update MPAndroidChart to 2.1.6 2015-11-13 23:57:04 +01:00
cpfeiffer 2e267a4c2b Temporary workaround for totally wrong sleep stats
The reason being that we filter samples by activity kind
and then calculate the total sleep time using a delta between two
consecutive sample timestamps. But due to filtering of samples, not
all samples are consecutive. Instead of we have "holes" and add those
to your sleep time.

The data in the db is correct though (it always is), it's just the
display in the app that is wrong.
2015-11-09 23:56:46 +01:00
cpfeiffer d9722c6db2 Translate strings, remove unused variable 2015-11-09 23:56:46 +01:00
cpfeiffer 4200e77016 Disable activity data fetching when not supported
Closes #149
2015-10-24 23:28:55 +02:00
cpfeiffer aa5749cd40 Some improvements to live activity.
Still rather inaccurate due to missing timing information.
2015-10-21 00:36:18 +02:00
cpfeiffer 45fc2c181c Add pulldown to sync and tabs in the charts activity #138 2015-10-17 17:10:14 +02:00
cpfeiffer 0d27245dd1 Some more translations + reoder live activity layout 2015-10-04 00:17:24 +02:00
cpfeiffer 93523d7831 Fix crash introduced by translation before onCreate() 2015-10-03 10:08:48 +02:00
cpfeiffer baa2d0b27a Displaying live activity data works well enough 2015-10-02 23:38:07 +02:00
cpfeiffer c9e91bd708 Some work in enabling the history of step count
Doesn't work yet.
2015-10-02 00:07:19 +02:00
cpfeiffer 2149b18ae3 Yay, animating live activity data works.
Nice hack: MPAndroidChart supports animating values, but only animating
a new entry, going from zero to its actual value. We want to animate
a single entry changing its value.

Since it's just a single entry, we can let a custom animator do this
(without knowledge of any other entries).
2015-10-01 22:36:33 +02:00
cpfeiffer 4250a002b4 Merge branch 'master' into live-activity-data 2015-09-27 00:16:04 +02:00
cpfeiffer 0395977fde Some work for properly animating our single (value-changing) entry 2015-09-27 00:10:33 +02:00
Andreas Shimokawa 1d41f2f8e4 Refactoring
The notfification APIs now use NotificationSpec as their only parameter, which
contains all information (required and optional ones).
We no longer have separate methods and actions for SMS/EMAIL/GENERIC anymore.
The type of notification is important now, not how we received them technically.
2015-09-24 14:45:21 +02:00
cpfeiffer 8ba307657a Migrate from MPAndroidChart 2.1.0 to 2.1.4
This actually makes our CustomLegendRenderer and CustomBarChart
unnecessary.
2015-09-24 00:04:21 +02:00
cpfeiffer d9d222ca9b Tiny logging improvement 2015-09-09 21:15:29 +02:00
cpfeiffer bc3c0760d0 More WIP with live activity charts 2015-09-05 23:05:57 +02:00
cpfeiffer 8f4e933e30 More WIP on live activity:
- keep screen on while live activity is visible
- hide the date bar (prev&forward buttons)
- live activity chart is still nowhere near usable
2015-09-04 21:55:29 +02:00
cpfeiffer 9a1f4875fc Temporary backup with live activity 2015-09-03 23:20:47 +02:00
cpfeiffer 42420e676b More WIP: displays live activity data 2015-09-02 23:49:06 +02:00
cpfeiffer ab8982e7f2 WIP: support for live display of activity data 2015-09-02 08:02:26 +02:00
cpfeiffer 536b2bd8a0 Another translatable string 2015-09-01 23:56:14 +02:00
cpfeiffer c49c795b1d Actually remove that implicit "current date" handling
We now manage days explicitly in the UI.
2015-09-01 22:43:31 +02:00
cpfeiffer d791054e42 Fix getLast24Hours() -- take end time into account 2015-09-01 22:37:20 +02:00
cpfeiffer a6d18e599b Tiny simplification and extract string 2015-09-01 22:34:04 +02:00
cpfeiffer 917801f223 Use the correct date for displaying steps #91 2015-09-01 22:13:30 +02:00
Daniele Gobbetti 9360b81ef3 Don't add new limitlines, clean the existing one before (it could be optimized further by reusing the existing one, probably) 2015-08-31 17:41:09 +02:00
Daniele Gobbetti 249ff5bf94 Let the user change date also on the Week steps chart 2015-08-31 17:41:09 +02:00
Andreas Shimokawa 13300fcb5d finally fix build with SDK 23 2015-08-29 11:31:48 +02:00
Daniele Gobbetti 26792717d4 Add showing when the device wasn't worn by the user 2015-08-28 14:58:30 +02:00
Daniele Gobbetti fb5ebeacb6 Light colors for the graphs.
Closes #99
2015-08-28 14:58:30 +02:00
cpfeiffer e1c02cc373 Prevent charts date in the future, documentation and cleanup 2015-08-25 22:45:07 +02:00
cpfeiffer b4e34db1d2 Faster animation 2015-08-25 01:03:58 +02:00
cpfeiffer 0bb3188bc8 Start and end dates now work properly across charts
They are now managed by the Activity, because the fragments
may be created and destroyed at any time and hece cannot
synchronize their date-state all the time.

Open issue: moving across the borders (first day with data,
current day)
2015-08-25 00:54:16 +02:00
cpfeiffer e47ebb8f09 Improvements to charts
- backward and forward buttons work better
- buttons only refresh the current fragment now
- activity shows fragment-specific titles
2015-08-25 00:33:37 +02:00
cpfeiffer a1cb246e27 Add and use a "client interface" for the actions of the service
Previously, the DeviceCommunicationService was invoked directly,
via
Intent intent = new Intent(foo, bar);
intent.setExtra(EXTRA_BAZ, baz);
startService(...);

and this was scattered throughout GadgetBridge.
Now there is a "frontend" available, so that you can call
the service more easily, like
GBApplication.deviceService().connect();

For a start, this client interface (DeviceService) actually
implements the same interface (EventHandler) as the receiving side
(DeviceSupport). This may change in the future.

This will also make testing much easier, because we can use
this client interface to invoke the test service as well.
2015-08-21 01:03:57 +02:00
cpfeiffer 5a4f8fb56f Last commit accidentally called the wrong get*Samples method 2015-08-19 01:06:46 +02:00
cpfeiffer bcf42f8022 Finally, the prev and next buttons do something (#79)
Far from perfect, but a start.
2015-08-17 02:22:16 +02:00
cpfeiffer 27a9eb8a07 Only repaint chart when activity is still alive
(fixes error message when synchronizing in the charts activity and then
switching orientation)
2015-08-16 23:27:18 +02:00
cpfeiffer 567f27b0f4 Some initial fixes found by static analysis #92 2015-08-16 00:17:16 +02:00
cpfeiffer c407ed1a76 Last refactoring for now: BluetoothCommunicationService
- rename to DeviceCommunicationService
- move all bluetooth related bits into separate DeviceSupportFactory
  class
2015-08-04 01:01:14 +02:00
cpfeiffer 7c597b325a Big refactoring: move classes and packages around to get a better structure
- model package contains mostly shared interfaces (UI+service), not named GB*
- impl package contains implementations of those interfaces, named GB*
  the impl classes should not be used by the service (not completely done)
- the service classes should mostly use classes inside the service and deviceevents
  packages (tbd)

Every device now has two packages:
- devices/[device name] for UI related functionality
- service[device name] for lowlevel communication
2015-08-03 23:09:49 +02:00