1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-24 15:43:46 +02:00
Commit Graph

35 Commits

Author SHA1 Message Date
Sergey Trofimov
d57c6166b9 Fix pairing with MI1A 2015-10-18 21:54:22 +03:00
cpfeiffer
586d959055 Merge branch 'master' into live-activity-data 2015-10-02 23:49:03 +02:00
cpfeiffer
baa2d0b27a Displaying live activity data works well enough 2015-10-02 23:38:07 +02:00
Daniele Gobbetti
d14ccf1c5c Get device name from the BLE Standard Characteristic.
Always log read and notify characteristics, even if unhandled.
Changed Log statements for write action to make them clearer.
2015-09-28 16:47:43 +02:00
Daniele Gobbetti
18f952250a First working code for vibrations on firmware version 1.0.10.14 2015-09-28 12:53:42 +02:00
cpfeiffer
4250a002b4 Merge branch 'master' into live-activity-data 2015-09-27 00:16:04 +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
Andreas Shimokawa
95e22a4e32 Pebble: Allow stopping apps though PebbleKit messages (also in the API) 2015-09-13 21:44:26 +02:00
Andreas Shimokawa
4f80844016 noficicaion_kind -> notificationKind 2015-09-13 13:38:11 +02:00
Julien Pivotto
d50a82d495 Pebble: Set application icons for generic notifications
Closes #116.
2015-09-13 00:39:53 +02:00
cpfeiffer
c23905070c Some more logging improvelets 2015-09-09 23:39:57 +02:00
cpfeiffer
e0ccb6bf84 Log the date/time that we sync to the Mi Band #91 2015-09-09 21:53:28 +02:00
cpfeiffer
42420e676b More WIP: displays live activity data 2015-09-02 23:49:06 +02:00
Daniele Gobbetti
b6cbb5d6be read initial value of live steps data when enabling notification 2015-09-02 16:36:20 +02:00
cpfeiffer
ab8982e7f2 WIP: support for live display of activity data 2015-09-02 08:02:26 +02:00
cpfeiffer
5c2bd1e8df Avoid code duplication by reusing logMessageContent() 2015-09-01 21:26:51 +02:00
Andreas Shimokawa
46171e4ab8 Some preparations for interactive notifications 2015-08-31 22:27:25 +02:00
Daniele Gobbetti
cbea0feb9e Centralize the calendar conversion to/from byte array take 2.
Move to an independent class.
2015-08-28 10:40:25 +02:00
Daniele Gobbetti
677e0808bf Centralize the calendar conversion to/from byte array. 2015-08-27 13:12:09 +02:00
Daniele Gobbetti
dcc988139f Merge remote-tracking branch 'origin/master' into low_battery_notification 2015-08-21 17:34:11 +02:00
Daniele Gobbetti
eb39ce9367 Further improvements:
- append a string on the control center when the device is charging
- battery status string is no more, welcome battery state enum
- the notification will not be shown when the device is charging, even if the level is below threshold
2015-08-21 08:41:57 +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
Daniele Gobbetti
c3e395818f Adding support for battery events using GBDeviceEvent.
- show notification on low battery (closes #40)
- Miband specific: add date of last charge and number of charges
2015-08-18 17:37:51 +02:00
cpfeiffer
99293d4ee5 Also extracted firmware update to separate operation 2015-08-18 00:52:02 +02:00
cpfeiffer
dbb92b55bc Make the Operations classes BLE-generic 2015-08-18 00:31:40 +02:00
cpfeiffer
33b598ce5c First part of extracting parts out of MiBandSupport
Extract Activity Data fetching into distinct 'operation' class.

Fix a few small things wrt transaction-local GattCallbacks along the way.
2015-08-18 00:11:53 +02:00
cpfeiffer
e6a0c35f73 Extract checksum implementations into separate class CheckSums 2015-08-17 22:43:42 +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
0bd65e050c Make intensity also always positive #91
I never experienced such values, but others apparently do...
2015-08-16 23:18:32 +02:00
cpfeiffer
a66a3a15c2 Fix remaining byte parameter in the API for steps.
Maybe this was the reason for #91 (negative steps)

This could happen making at least 3 steps per second.
2015-08-15 00:23:13 +02:00
cpfeiffer
ecc483f027 Remove now unused class 2015-08-14 23:50:21 +02:00
cpfeiffer
d0229847e7 onFirmwareVersionReq() is no more
- version information is now provided implicitly by device initialization
- ACTION_REQUEST_VERSIONINFO is now ACTION_REQUEST_DEVICEINFO and it will
  return the current device state of the service without asking any DeviceSupport
  instance.
- ACTION_CONNECT now implicitly answers with a device update intent if it
  IS already connected.
2015-08-14 23:37:47 +02:00
Daniele Gobbetti
b6d3317b2d First step for GBDeviceEvents support:
- change fw handling to GBDeviceEvent
- misuse the hw version for showing the MiBand device name (there is still no option to set a custom name)
2015-08-10 10:35:55 +02:00
cpfeiffer
910d9ef398 Make firmware reading a bit more failsafe #30 2015-08-04 23:02:36 +02:00
cpfeiffer
db4261e02b More refactoring: new service/devices package and service/bt package 2015-08-03 23:51:53 +02:00