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

1344 Commits

Author SHA1 Message Date
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
3bb673d33a Pebble Time Round support ("chalk" platform) 2015-09-23 23:20:49 +02:00
cpfeiffer
3852fcd756 Reuse MiBandDateConverter 2015-09-23 23:16:42 +02:00
Andreas Shimokawa
77b4bb9cf1 Mi Band: Do not whitelist 1.0.10.14 anymore, vibration seems to be broken with Gadgetbridge 2015-09-20 22:13:25 +02:00
Daniele Gobbetti
55341678b3 Add firmwares from the wiki. 2015-09-17 16:56:23 +02:00
Daniele Gobbetti
b73ff49681 Use data type constant instead of hardcoded value 2015-09-17 16:56:23 +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
d3dbde6917 Some refactoring:
- Put Pebble icon ID constants in its own class
- remove ICON_ and COLOR_ prefixes from constants
2015-09-13 15:21:07 +02:00
Julien Pivotto
1027336591 Pebble: Support colors in 3.x notifications (Pebble Time)
* Generic notifications are still red
* Colors are in a separated static class

Closes #120.
2015-09-13 14:54:43 +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
518b1ee6f4 Merge branch 'master' into live-activity-data 2015-09-07 21:41:02 +02:00
Daniele Gobbetti
6c28b50f52 allow the transfer of activity data without clearing MiBand's memory 2015-09-07 12:06:56 +02:00
cpfeiffer
ab8982e7f2 WIP: support for live display of activity data 2015-09-02 08:02:26 +02:00
Andreas Shimokawa
46171e4ab8 Some preparations for interactive notifications 2015-08-31 22:27:25 +02:00
Daniele Gobbetti
ee3ca5998e Fail early when opening a pebble file.
Fixes #102

We could also use a whitelist approach instead, but we can't be sure that the user installs a file with .fw extension, hence i preferred to only avoid loading files which are known to be of the wrong type.
2015-08-31 17:41:09 +02:00
cpfeiffer
41d8bcf634 Make firmware and app installation a bit more user friendly #30 2015-08-30 00:21:51 +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
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
df417e5c6c Fix bug regarding setting wear location.
Closes #95
2015-08-21 15:23:48 +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
Andreas Shimokawa
faaa04b670 App Installation: various improvements
- make FwAppInstallerActivity wait for a completely initialized device
- check basalt/aplite compatibility with pbw to be installed and report intead of crashing
- fix crash when trying to install pbw with all app slots full
2015-08-20 18:55:22 +02:00
cpfeiffer
e6a0c35f73 Extract checksum implementations into separate class CheckSums 2015-08-17 22:43:42 +02:00
Andreas Shimokawa
6fede31bdf Pebble: make watchapp installation available on FW 3.x without the need for setting an option 2015-08-17 18:07:47 +02:00
cpfeiffer
964994972b Fix for pebble sample provider switching without quitting gb) 2015-08-16 23:30:16 +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
Andreas Shimokawa
f659e34efc Pebble: do not use platform dir for pbz(firmware) files, even basalt has its files in / for fw files 2015-08-14 17:32:06 +02:00
Andreas Shimokawa
e28d6fa7cb Pebble: try to install app metadata on FW 3.x (untested) 2015-08-14 12:51:30 +02:00
Andreas Shimokawa
151f5b8e12 Pebble: Choose binaries from basalt/ inside .pbw files for Pebble Time
PBW installation is still unsupported on FW 3.x, these are just preparations
2015-08-11 12:47:23 +02:00
Andreas Shimokawa
5a8c9a9180 Pebble: cache installed pbw files on sdcard if force untested option is set
This will be needed for FW 3.x on demand installations.
2015-08-11 12:04:45 +02:00
Andreas Shimokawa
0be251e83d Pebble: if untested features option is enabled use Gadgetbridge sample provider insted of Morpheuz 2015-08-11 11:21:10 +02:00
Andreas Shimokawa
5884684cad Pebble: add option to enable untested features.
Bad things incoming ;)
2015-08-11 11:15:44 +02:00
Daniele Gobbetti
fe11e6d306 Some BTLE cleanup:
- the BASE_UUID is shared between all BTLE devices, not miband specific. So are the UUID DESCRIPTORS. Hence these have been moved to AbstractBTLEDeviceSupport
- the gatt-characteristic-property-constants used previously in MiBandNotifyAction are also general, and exposed by the gatt subsystem, hence the specific action has been dropped moving the logic to the NotifyAction class
 - the logic for checking the gatt-characteristic-property-constants has been extended also to the ReadAction and WriteAction class, this way we won't try to read (or write)  a characteristic that isn't readable (or writeable)
2015-08-07 16:59:52 +02:00
cpfeiffer
9004a8b0c1 Experimental: ACTION_START is now optional -- ACTION_CONNECT is sufficient 2015-08-06 23:17:41 +02:00
cpfeiffer
64298fc9af Small improvements for the install activity #30
Now starts the service if not already running
2015-08-06 21:35:00 +02:00
cpfeiffer
2a2eae068a Improvements to the install activity #30
- made it independent of Mi fw and Pebble fw + app classes
- automatically connect to the last used device
- some other small fixes/improvements
2015-08-06 02:17:38 +02:00
Daniele Gobbetti
495a8cc650 Reorder the lines in the MiBandService class.
No functional changes, just clarity enhanchement.
2015-08-05 17:32:02 +02:00
cpfeiffer
e92c9dbbb5 Better check for fw version major (#30) 2015-08-04 23:08:40 +02:00
cpfeiffer
910d9ef398 Make firmware reading a bit more failsafe #30 2015-08-04 23:02:36 +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
db4261e02b More refactoring: new service/devices package and service/bt package 2015-08-03 23:51:53 +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