Commit Graph

26 Commits (962720145e3678f5ffd17ea6c4a9e277a665b144)

Author SHA1 Message Date
cpfeiffer 962720145e Fix custom language being lost for newly created activities
So we do need to set the language both on change and onCreate()

For some reason, the title bar of the SettingsActivity is not updated on recreate().

Closes #787
2017-09-03 01:04:34 +02:00
License Bot 6a842c52fa Update license header in all java files. 2017-03-16 17:36:15 +01:00
Daniele Gobbetti 0ac77fc0a4 Remove the legacy ControlCenter and its usages. Add New GUI to the changelog. 2017-03-11 19:49:57 +01:00
License Bot e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
cpfeiffer ec6a8b6743 MI: some more logging 2017-01-28 23:25:15 +01:00
cpfeiffer ac68bfe351 Mi Band 1+2: backend implementation of making BT pairing optional
- cleaned up the DeviceService.connect() variants
- discovery: pass the device candidate around instead of the mac address

Attempts to fix #512, #514, #518
2017-01-26 00:16:38 +01:00
cpfeiffer 4c26c2933b Mi Band 1+2: make BT pairing optional
(Attemts to fix #512, #514, #518)
2017-01-26 00:16:38 +01:00
cpfeiffer d103d09fcf Mi Band: just a method rename 2017-01-26 00:16:38 +01:00
Andreas Shimokawa 029cc02a29 Pebble: Add Pebble specific pairing activity mainly useful for Pebble 2 since it properly pairs the Pebble after connecting with BLE
Fixes #433
2016-11-19 22:13:00 +01:00
cpfeiffer a941a6cd5f Make some strings translatable 2016-10-28 23:47:39 +02:00
cpfeiffer 7b26986ab0 Fix for #349
We must not use UUID_CHAR_PAIR anymore. This prevents connecting
without being bonded. Connecting when bonded still works.

As without bonding, ControlCenter would not display the device anymore,
we have to re-install the "remember last connected device" in the
preferences thing.
2016-07-15 00:13:49 +02:00
cpfeiffer 80930ce42a More logging for pairing, destroy pairing activity when bonding failed #349 2016-07-10 00:11:28 +02:00
cpfeiffer 94cc1a883a Use GBActivity in Pairing Activity for theming 2016-07-05 22:13:11 +02:00
cpfeiffer abeb642972 Don't remember paired Mi device in preferences
(this was just a very old workaround for an even older Mi firmware
that couldn't pair)
2016-07-05 20:27:23 +02:00
cpfeiffer e35ce978bd Remove now unused imports + fix one more SharedPreferences usage 2016-04-25 23:43:19 +02:00
cpfeiffer 0c715a2669 Wrap access to SharedPreferences with "Prefs"
(to centralize quirk handling)
2016-04-25 23:18:55 +02:00
cpfeiffer c86365ee2e Some more Mi Band pairing improvements #180
- listen to notifications early -- the band then actually tells us that
  authentication is required
- check for this after sending user info
- add authentication states to GBDevice
- workaround for event problems in pairing activity (delivered although
  already unregistered)
- BtLEQueue now deals with gatt events coming *before* connectGatt()
  actually returned (namely the connection event)
2016-02-13 00:15:16 +01:00
cpfeiffer 41dde9a9c2 Programmatically perform a bonding
(i.e. bluetooth-level pairing). Previously the pairing appeared to
happen automagically, but this doesn't work (anymore). So now we first
pair on the bluetooth-level, then application level.
2016-01-06 00:16:41 +01:00
cpfeiffer f258e62633 Refactoring: centralize GBDevice creation
- created and provided by DeviceHelper
- passed from UI to service
- without UI, service uses DeviceHelper directly

=> Cleaner and less duplicated code
2015-12-13 00:43:07 +01:00
cpfeiffer b056e1b2a0 tiny log addition 2015-12-07 01:13:47 +01:00
cpfeiffer bd0716ba58 Some more lint warnings fixed 2015-11-23 23:04:46 +01: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 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 9004a8b0c1 Experimental: ACTION_START is now optional -- ACTION_CONNECT is sufficient 2015-08-06 23:17:41 +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