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
Andreas Shimokawa
73da7fff0a
Refactoring: rename GBDeviceCommand to GBDeviceEvent
2015-06-23 11:54:33 +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
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
56d314d054
Reformat code and optimize imports
2015-06-13 00:32:48 +02:00
Daniele Gobbetti
ac7e21be48
Remove the activity log debug file.
...
This partially reverts commit 8b268a676c
2015-06-12 22:30:14 +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
cpfeiffer
d0b9914770
Keep the db open while adding samples
2015-06-09 21:05:44 +02:00
cpfeiffer
ab97b544f0
Some cleanup + actually remember event time and kind for throttling
2015-06-06 23:59:53 +02:00
cpfeiffer
f6d5767276
Remove reference to PebbleIOThread from BluetoothCommunicationService
...
Let PebbleSupport do this instead.
2015-06-06 23:24:00 +02:00
cpfeiffer
020d8d74d6
Added "Fetch Activity Data" to the context menu.
...
With some kind of progress reporting during the fetching #45
2015-06-06 19:39:04 +02:00
cpfeiffer
9e4e50be47
Initial work on synchronizing activity data with feedback.
...
A device now has a busy flag (set during synchronization). While busy,
no other communication with the device shall occur (TODO)
Refactors the non-bluetooth actions a bit #45
Next step: make use of the busy state in ControlCenter (show
a busy cursor) and in BluetoothCommunicationService (to not call other
operations while busy)
2015-06-06 00:40:16 +02:00
Daniele Gobbetti
a1ff9aab21
Do not iterate over the whole buffer, but only on the effectively used part.
...
This should fix the "data in the future" issue
2015-06-04 18:56:35 +02:00
Daniele Gobbetti
406f9ab90d
Do not allocate the buffer if there's no data available.
...
Perhaps could fix the "data in the future" issue
2015-06-02 18:33:12 +02:00
Daniele Gobbetti
9e2d32c33f
Fixed timestamp conversion for DB, added local variables to make the code clearer
2015-06-01 22:20:28 +02:00
Daniele Gobbetti
ea97a902d1
*unchecked* Storing activity values in the DB.
2015-06-01 22:20:28 +02:00
Daniele Gobbetti
8b268a676c
Refactoring of the data ingestion method.
...
* no more ByteBuffer, but a fixed size byte array that gets flushed everytime it's needed
* log of activity data to a separate file (no DB integration yet)
* the size of the buffer must be a multiple of 3 (1 minute of data = 3 bytes) and 20 (the normal size of the chunks we get from the device)
* better logging and more comments in code
2015-06-01 22:20:22 +02:00
cpfeiffer
7f89f4bb57
Some fixes regarding device initialization, should avoid disconnects
...
Avoid repeated initializations and device info requests. Fix unsetting
of dynamic state (e.g. battery info) when initialized.
2015-06-01 21:47:02 +02:00
Daniele Gobbetti
f60903699e
Delete MiBandSupport.java.orig
...
I believe it was committed by mistake (perhaps a merge conflict?) It's out of date in any case.
2015-06-01 21:47:02 +02:00
cpfeiffer
11884d8073
Improve logging
2015-06-01 21:47:02 +02:00
Daniele Gobbetti
228e922ce7
forgotten refactor of a variable
2015-06-01 21:47:01 +02:00
Daniele Gobbetti
e4076dc725
Ingesting the activity data the right way, but they are still being thrown away afterwards.
2015-06-01 21:47:01 +02:00
cpfeiffer
92caed5af4
Some cleanup
2015-06-01 21:47:01 +02:00
cpfeiffer
a7792f6b72
improve some log statements
2015-06-01 21:47:01 +02:00
cpfeiffer
637b43e892
Also wait for descriptor reads and writes
...
(not just characteristic reads/writes)
This fixes initialization of notification characteristics
(activity, sensor data, battery, ...)
2015-06-01 21:47:01 +02:00
cpfeiffer
f004b7b11c
WIP for fetching activity data
...
This probably affects #44 and #45
Thanks go to Daniele Gobbetti <daniele@gobbetti.name>!
2015-06-01 21:47:01 +02:00
Daniele Gobbetti
7e2545f9b4
Use constants instead of hardcoded values
2015-05-21 18:19:07 +02:00
Andreas Shimokawa
c4f7fc1531
Start App on Pebble when tapping it AppManager
2015-05-18 22:20:01 +02:00
Andreas Shimokawa
c37cacf43d
Remove id and index from GBDeviceApp in favor of UUIDs
2015-05-18 20:56:19 +02:00
cpfeiffer
d1d3e758d9
Support configurable notifications. Closes #53
...
To close #29 , we need to have a bit more configuration options than
just the number of vibrations. E.g.
- duration
- pause
- LED flashing (again, number of flashes, duration and pause, but also
the colour and maybe which LEDs)
Also implements reboot-functionality for Mi Band.
2015-05-17 22:57:37 +02:00
Andreas Shimokawa
2b98620ee0
Mi Band: Prepare preferences for vibration count, use number as input type for numeric field
2015-05-14 13:04:21 +02:00
cpfeiffer
27d725853f
Add extra handler for generic notifications
...
(instead of misusing onSMS handler). Pebble still does that,
but not everybody has to.
Small step for #53
2015-05-13 21:55:22 +02:00
Andreas Shimokawa
c81e28c030
simplify code
2015-05-12 20:32:34 +02:00
Andreas Shimokawa
1b2f20160a
fix some lint warnings, mostly simplifications
2015-05-12 20:09:35 +02:00
cpfeiffer
9a26769c3e
Search & replace: use slf4j for logging instead of Logcat directly
...
For a start, use android-logger as backend. Needs a better configuration
but no time right now.
For file-logging we will use logback as slf4j-implementation.
2015-05-12 06:33:37 +02:00
cpfeiffer
61e8d88de4
Rename constant
2015-05-10 21:13:05 +02:00
Andreas Shimokawa
7f5b495480
Move Mi Band MAC address setting to Mi Band Settings
2015-05-10 13:08:28 +02:00
cpfeiffer
60210e069c
Fix validity check with gender and type
2015-05-09 23:13:47 +02:00
cpfeiffer
b2518ff927
Discovery + pairing now works
...
User info is asked on demand before starting the actual pairing.
When no (valid) user info is given, dummy user infor will be used instead.
2015-05-07 23:52:44 +02:00
cpfeiffer
a23690c8e1
Initial support for Mi Band specific settings
...
(User info for now).
TODO: We need to have that information *before* starting a connect
2015-05-07 01:32:17 +02:00
cpfeiffer
7b02548427
Clear task stack after discovery ( #33 )
2015-05-06 00:17:28 +02:00
cpfeiffer
50034e0bfe
Request battery info in initialize()
2015-05-05 23:25:54 +02:00
cpfeiffer
9df661bd96
Initial (ugly) support for device discovery and pairing ( #3 )
2015-05-05 00:48:54 +02:00
Andreas Shimokawa
f143c9ec54
androidstudio vs. eclipse :/
2015-05-01 01:49:43 +02:00
cpfeiffer
8b3b4d0882
#46 make all strings localizable
2015-05-01 01:26:30 +02:00
cpfeiffer
5a458611e2
Set the time during initialization. Necessary for steps tracking.
...
Also see #31
2015-04-27 21:43:57 +02:00
Andreas Shimokawa
613ff1fc91
Pebble: corrections to PebbleIoThreads, better logging
2015-04-26 00:54:41 +02:00
Daniele Gobbetti
98696ce9e2
Implement setting the time on the miband.
...
It works from the debug activity, since I am not sure about the value of
the ts argument, it always sets the current time.
2015-04-23 14:11:57 +02:00