Commit Graph

40 Commits

Author SHA1 Message Date
License Bot 1b5402dcb4 update license headers 2021-01-10 23:38:13 +01:00
TaaviE 6cd59fbd24 Refactored all pairing and bonding activities (#1989)
Fixed a few warnings

Refactored all bonding and bonding activities

Co-authored-by: TaaviE <taavi.eomae+github@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/1989
2020-08-28 15:38:18 +02:00
TaaviE 7db3b68047 Fixed a bunch of warnings 2020-08-26 09:38:31 +02:00
Andreas Shimokawa 53f5439444 Start implementing device aliases (#1888) 2020-06-12 18:04:53 +02:00
Andreas Shimokawa 1e398419a8 Watch9: Fix launch of wrong calibration activity
Fixes #1875
2020-05-24 23:25:52 +02:00
Andreas Shimokawa fa2d954552 Add alarm title and description field to alarm configuation
Wire it up and enable for Fossil Hybrid HR
2020-04-24 10:39:32 +02:00
Andreas Shimokawa ddd70f93fc Fossil Hybrid HR: option to force white background
Currently needs reconnect and one change to the widget configuration to be effective.

This might improve visiblity of the hands when using a model with gray hands
2020-02-27 13:38:45 +01:00
Andreas Shimokawa 1c91c037a8 Merge branch 'master' into fossil-q-hr 2020-01-29 17:22:21 +01:00
Dmitry Markin 10c9b07c69 Control alarm snooze mode on MiBand2 2020-01-12 12:02:04 +03:00
License Bot d6fa5d0dd5 Update license headers 2020-01-09 10:44:32 +01:00
cpfeiffer 00830218e7 Q HR: Allow specifying key during discovery 2020-01-03 12:24:34 +01:00
FYG_license_bot_ignore_me 8e5c4b4602 Update license headers 2019-11-23 21:53:22 +01:00
Andreas Shimokawa 4bf37ea70f Mi Band 4/Amazfit Bip Lite: Display a toast and do not try to pair if there was no auth key supplied 2019-10-12 19:44:45 +02:00
Andreas Shimokawa 876515f1fd Amazfit Cor: support custom emoji font
This commit refactors code and implements a custom device specific string
filter, which does nothing by default.
The implementation in HuamiSupport does the custom emoji conversion.

The setting has been moved from devicesettings_amazfitbip.xml to an extra file
As soon as there is a custom font for Mi Band 2/3/4 it is sufficient to add
"devicesettings_custom_emoji_font.xml" to the list of supported settings
in the appropriate coordinator and everything will work.
2019-09-14 00:05:39 +02:00
vanous cf28ee48f4 add .apply() 2019-09-07 22:41:35 +02:00
vanous 975b698564 remove preference keys when deleting device 2019-09-07 22:41:35 +02:00
Nephiel b40c3ade85 Amazfit Bip: Add emoji support when using custom font firmware 2019-08-31 22:32:18 +02:00
Andreas Shimokawa 9bfef4cf4f Make per-device settings more versatile, move more settings
This allows to construct per-device settings by device type very easily

device coordinators just do the following to declare which setting they support,
the settings activity is then composed at runtime.

@Override
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
     return new int[]{
            R.xml.devicesettings_miband3,
            R.xml.devicesettings_swipeunlock,
            R.xml.devicesettings_pairingkey
    };
}
2019-05-22 00:42:22 +02:00
Andreas Shimokawa db48707764 Add a device specific settings activity, currently used for setting the auth key for Amazfit Bip/Cor
When connecting to a new device, a random key gets generated, which can be
looked up from the device specific settings (accessible via the gear icon in
the device card in the main activity). Old devices keep their 0123456789@ABCDE
key, they have to be re-paired to change that.
During pairing, long-pressing the device candidate in the discovery activity
will also start the device specific settings activity, where the auth key
can be set manually priror to pairing. This is usefull to keep the ability to
pair one device with multiple android devices.

Fixes #1308
2019-04-21 21:25:33 +02:00
Daniele Gobbetti 7c918ee191 Add UI to invoke device specific settings Activity
Currently the icon in the card is hidden for all devices, since the
functionality is not implemented yet
2019-04-21 15:59:39 +02:00
License Bot beedb653e6 Update license headers 2019-02-13 20:43:31 +01:00
Daniele Gobbetti 75d3dffb14 Migrate to androidx support libraries and bump compile SDK version
"Optimize imports" has been run on all source files, there might be
unrelated changes, but these should be harmless.
2019-01-26 16:00:56 +01:00
Matthieu Baerts 8d78c45e7d messages: convert emoji's to supported chars
Some devices don't support emoji's and display a series of `?` chars.
Instead of that, replace them by `:<emoji>:` text, e.g. `A 🐱` is
replaced by `A 🐱`.

This is done by using 'android-emojify' project and their
`EmojiUtils.shortCodify(text);` function.

For more details about this lib released under MIT license:

    https://anitrend.github.io/android-emojify/
2018-12-23 12:52:49 +01:00
José Rebelo cc6c57bd4c Add support for LED Color, FM Frequency 2018-08-31 14:03:39 +01:00
License Bot 696653eabf Update contributors list and license headers. 2018-08-29 21:30:23 +02:00
Andreas Shimokawa da58e22afe Only start MusicPlaybackReceiver if device supports music info
Also block sending music info in HuamiSupport if device does not support it
2018-08-07 12:44:00 +02:00
Andreas Shimokawa 3d3cc1f40c Merge branch 'master' into bip-wip 2018-03-13 17:27:18 +01:00
License Bot 238bacde9f Update license headers 2018-02-26 14:27:33 +01:00
cpfeiffer f5318287c4 WIP: Bip GPS fetching, parsing, exporting
Also adjust Mi2 date/time sending wrt DST offsets
2017-10-31 23:16:39 +01:00
License Bot 3ea2ac6dd2 Update license headers 2017-10-25 09:29:36 +02:00
cpfeiffer b142add631 Pass a GBDevice instead of GBDeviceCandidate to getBondingStyle() #651 2017-04-17 23:00:16 +02:00
cpfeiffer 5b8624de71 Make pairing optional after discovery
See #642 which might be fixed by not pairing.
2017-04-06 23:47:35 +02:00
License Bot e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
cpfeiffer b9ff2cd468 A few improvements to discovery
- display the right icon for found device candidates
- scan for specific LE services
2016-11-27 01:09:20 +01:00
cpfeiffer a39e3a035c Move device deletion logic to DeviceCoordinator and subclasses 2016-10-24 20:02:44 +02:00
cpfeiffer f1243f52c1 Deactivate some unsupported things for Mi2 2016-10-11 20:23:25 +02:00
cpfeiffer fbf06c1fe3 Separate coordinator and support instances for Mi1 and Mi2 #323
+ Some more testing stuff for Mi2
2016-08-17 00:53:16 +02:00
cpfeiffer 7613b62dab Improved discovery mechanism #323
Does not rely solely on mac addresses anymore. Should help when
mac address randomization is used.
2016-06-28 00:35:50 +02:00
cpfeiffer 81c2f657bd Some lint fixes 2015-11-23 22:46:12 +01:00
cpfeiffer 4200e77016 Disable activity data fetching when not supported
Closes #149
2015-10-24 23:28:55 +02:00