Commit Graph

29 Commits

Author SHA1 Message Date
License Bot 1b5402dcb4 update license headers 2021-01-10 23:38:13 +01:00
Andreas Shimokawa 4fb79ac2b2 Huami: Add new option to disting to properly distinguish connected adverising and 3rd party hr exposure 2020-12-13 22:38:03 +01:00
Andreas Shimokawa 9c239ec371 Amazfit Cor/Cor2: Allow workout syncing 2020-09-01 20:05:06 +02:00
Andreas Shimokawa c9d98e60a9 Huami: Mark all devices as supporting device actions except mi band 2 (need to check that one, assuming newer ones to work)
Also add high_mtu setting to Rex, GTR, GTS, Mi Band 5
2020-08-26 10:00:06 +02:00
Andreas Shimokawa 9a114f640b Huami: Make experimental calendar sync feature optional 2020-02-24 14:19:06 +01:00
License Bot d6fa5d0dd5 Update license headers 2020-01-09 10:44:32 +01:00
Andreas Shimokawa 1c82c4e8e1 Huami: make time format 12h/24h configurable (was automatic before)
Fixes #1736
2020-01-04 23:40:50 +01:00
Andreas Shimokawa b5e9727dcd Make some more settings per-device settings
- All ID115 settings migrated, allowing removal from settings activity
- All timeformat settings for all devices migrated
- All wrist location settings for all devices migrated (now you can have a mi band 3 on the left wrist and a bip  on the right wrist :P)

Also deduplicated some strings from zetime/generic preferences
2019-10-05 22:35:30 +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
Andreas Shimokawa 243eec042d Mi Band 3/4, Amazfit Bip/Cor: Add setting to expose the HR sensor to 3rd party apps
Closes #1606
2019-08-27 11:13:45 +02:00
Andreas Shimokawa d779310962 Move "activate display on lift wrist" and "rotate wrist to switch info" to per-device settings
"activate display on lift wrist" for Mi Band 2/3, Cor, Bip
"rotate wrist" only for Mi Band 2
2019-06-05 16:00:18 +02:00
Andreas Shimokawa 34e0c4e8bc remove swipe unlock settings from cor (can only be set from the band itself) 2019-05-22 19:04:38 +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 08e7d728c2 Huami: Migrate some settings to device specific settings
- Migrate language setting
- Migrate menu items setting
- Migrate lastsync timestamp from prefixed global shared prefercence

All settings should be automatically be converted (e.g. Amazfit Bip settings to all paired Amazfit Bip devices) and then deleted.

Cor Settings aleady completely vanished from the global settings menu.

When migration is done we will have a much cleaner settings menu. Will also remove confusion that some Cor settings have to be done in Bip settings.
2019-05-20 16:36:06 +02:00
Andreas Shimokawa 41e607ce9b Amazfit Cor 2: Give own device type id, support flashing the firmware **UNTESTED** 2019-05-09 12:42:59 +02:00
Andreas Shimokawa 6d28af1132 Mi Band 2: enable per-device pairing keys
Now enabled for all Huami devices
2019-05-02 22:40:28 +02:00
Andreas Shimokawa bb161aff59 Amazfit Cor: Also recognize "Amazfit Band 2" as Cor 2019-05-02 22:26:20 +02:00
Andreas Shimokawa 86270c0592 Try to enable Amazfit Cor 2 support but just using Amazfit Cor code.
Related to #1500
2019-05-01 19:51:32 +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
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
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
License Bot 238bacde9f Update license headers 2018-02-26 14:27:33 +01:00
Andreas Shimokawa d4ce333f14 Amazfit Cor: Fix problem with firmware 1.0.6.27 where Cor was detected as Mi Band 2
The root cause of this problem is that starting from firmware 1.0.6.27 the
bluetooth name was changed to "Amazfit Cor" from "Amazfit Band"

This resulted in advanced features not working, including firmware flashing.
2017-12-30 22:27:00 +01:00
Andreas Shimokawa f0ac296492 Initial support for cyanogenmod/lineage weather provider
TODO:
- also reconstruct json for Pebble background js fake replies
- find a better location for settings
- interatively display candidates when looking up location
- grey out setting on non-cm/los devices
2017-12-11 19:09:37 +01:00
Andreas Shimokawa 55cdc6d1c5 Amazfit Cor: Untested firmware update support
(refactor stuff along the way)
2017-10-24 22:01:25 +02:00
Andreas Shimokawa 83038a47ca use abstract HuamiCoordinator as base for MiBand2/HRX/Bip/Cor and separate from Mi1 Coordinator 2017-10-23 14:46:08 +02:00
Andreas Shimokawa 0f46ea2a59 Try to blindly add support for Amazfit Cor 2017-10-23 11:28:51 +02:00