1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-25 22:40:05 +02:00
Commit Graph

269 Commits

Author SHA1 Message Date
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
7923e153e6 Moved the enum to standalone in the model package. 2015-08-27 11:50:31 +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