Commit Graph
45 Commits
Author SHA1 Message Date
Thomas KuehneandJosé Rebelo 3320203c23 gradle: upgrade Android SDK to API 36 / Baklava
Keep targetSdk and minSdk unchanged. Ensure SDK is up-to-date as Google once again changed relevant CompanionDevice APIs.
2025-06-03 20:59:49 +02:00
Thomas Kuehne d6fb02619a Debug: assist user to input properly formatted MAC addresses
Android's Bluetooth rejects MACs with:
- lower letter (abcdef) instead of upper letters (ABCDEF)
- hyphens (-) instead of colons (:)

banglejs builds also support pebble emulator addresses
2025-06-03 01:04:01 +02:00
Thomas KuehneandJosé Rebelo b60b560d9d UI: use dynamic tint for icons to support light, dark and dynamic colour themes 2025-05-24 22:07:07 +02:00
Thomas KuehneandJosé Rebelo 6470931e2c ble: eliminate possibility of InternalGattCallback.getCallbackToUse race conditions 2025-05-24 18:14:24 +02:00
Thomas Kuehne 9848654b58 ble: fix GattCallback.onConnectionStateChange is never called 2025-05-24 16:52:46 +02:00
Thomas KuehneandJosé Rebelo c159a13a66 ble: support gadget initiated connections
The BluetoothDevice.ACTION_ACL_CONNECTED intent indicating gadget or Android imitated connections is not specific to Bluetooth Classic.
So make the GBPrefs.DEVICE_CONNECT_BACK setting available to both Bluetooth Classic and BLE.
2025-05-24 14:58:19 +02:00
Thomas KuehneandJosé Rebelo bb2ba155cc ble: explicitly deal with GATT status 8, 129 and 133 in BtLEQueue.handleDisconnected 2025-05-24 14:40:23 +02:00
Thomas KuehneandJosé Rebelo 9bb3279e67 UI: add icon for SpO2 measurement 2025-05-24 14:20:46 +02:00
Thomas KuehneandJosé Rebelo e87779d7ea UI: additional activity icons 2025-05-24 14:10:29 +02:00
Thomas KuehneandJosé Rebelo de4b59cdfc UI: add icon to the "About you" preferences 2025-05-23 21:40:38 +02:00
Thomas Kuehne b99e63104d UI: add icons for the "General settings" preferences 2025-05-23 20:21:27 +02:00
Thomas KuehneandJosé Rebelo e9415f3350 ble: add per-device setting to request BluetoothGatt.CONNECTION_PRIORITY_LOW_POWER 2025-05-21 20:51:14 +02:00
Thomas KuehneandJosé Rebelo a83026b180 ble: BluetoothDevice.getAlias replaced getAliasName in Android 11 2025-05-17 14:52:14 +00:00
Thomas KuehneandJosé Rebelo d646197107 ble: log names instead of numeric status and decode more BluetoothGattCallback status codes 2025-05-16 20:04:17 +00:00
Thomas Kuehne 1033299122 ble: fix wrong Logger in performInitialized 2025-05-15 22:12:20 +02:00
Thomas KuehneandArjan Schrijver f22fa75770 BleGattClientSupport: add GATT_SUCCESS check 2025-05-14 20:38:44 +00:00
Thomas KuehneandArjan Schrijver 53c2fdce54 logging: wrong number of placeholders 2025-05-14 20:34:08 +00:00
Thomas Kuehne 8259592c49 logging: wrong class argument used for LoggerFactory.getLogger 2025-05-14 22:06:32 +02:00
Thomas KuehneandJosé Rebelo 67eff1e361 huami+pebble: replace deprecated writeCharacteristic and writeDescriptor 2025-05-13 19:38:53 +00:00
Thomas KuehneandJosé Rebelo 7733f7ed28 GattCallback: memory safe onDescriptorRead
Change the method signature of GattCallback.onDescriptorRead to be memory safe. See Android 13 (Tiramisu, API 33) documentation for background.

To be memory safe onDescriptorRead should always evaluate the `value` parameter, potential in combination with BLETypeConversions, and not use:
- BluetoothGattDescriptor.getValue
- BluetoothGattDescriptor.getIntValue
- BluetoothGattDescriptor.getFloatValue
- BluetoothGattDescriptor.getStringValue
2025-05-13 19:36:17 +00:00
Thomas Kuehne e1de7efa55 BleNamesResolver: add BluetoothProfile#STATE_... lookup 2025-05-13 20:39:40 +02:00
Thomas Kuehne f453e21c0f onMtuChanged: add missing super calls and GATT_SUCCESS checks 2025-05-10 22:39:41 +02:00
Thomas KuehneandJosé Rebelo f3fd988aea fix the new BLETypeConversions.toFloat32 2025-05-10 15:36:14 +00:00
Thomas KuehneandJosé Rebelo 488c789e15 GattCallback: memory safe onCharacteristicChanged and onCharacteristicRead
Change the method signatures of GattCallback.onCharacteristicChanged and GattCallback.onCharacteristicRead to be memory safe. See Android 13 (Tiramisu, API 33) documentation for background.

To be memory safe onCharacteristicChanged and onCharacteristicRead should always evaluate the `value` parameter, potential in combination with BLETypeConversions, and not use:
- BluetoothGattCharacteristic.getValue
- BluetoothGattCharacteristic.getIntValue
- BluetoothGattCharacteristic.getFloatValue
- BluetoothGattCharacteristic.getStringValue
2025-05-10 15:36:14 +00:00
Thomas KuehneandJosé Rebelo 03e14edee4 switch the Java toolchain to version 21
Switch the Java toolchain to version 21 - the version shipped with current AndroidStudio releases.
Disable Java 1.8 warnings - see discussion in PR #4735
2025-05-10 13:09:46 +00:00
Thomas KuehneandJosé Rebelo 303d01530f Gradle: execute the genSources task only when necessary
Rebuilds where only elements in app/ where changed no longer re-generate the entity java files.
2025-05-10 08:46:21 +00:00
Thomas Kuehne 414d266666 Gradle: regenerate changelog_git.xml only when actually required
During one build buildGitChangelog is executed multiple times (one call per defined applicationVariant).
This slows down builds and - because it generates a resource file - blocks Android Studio's Instant Run feature.
2025-05-08 23:42:36 +02:00
Thomas KuehneandJosé Rebelo 8b92a479e1 log: use descriptive BluetoothStatusCodes instead of numeric codes 2025-05-04 19:29:53 +00:00
Thomas KuehneandJosé Rebelo f51237217c fix RequestConnectionPriorityAction waiting for a non-existing async BLE update 2025-05-04 19:28:48 +00:00
Thomas KuehneandJosé Rebelo dec5207c2d fix ServerResponseAction sending hardcoded status 0 instead of parameter value 2025-05-04 19:26:21 +00:00
Thomas Kuehne 9f9e4faa98 log: explain why ReadAction didn't try to actually perform a read 2025-05-04 19:37:51 +02:00
Thomas Kuehne 0f91b5790b fix AbstractBTLEDeviceSupport calling bleApi for unsuccessful onCharacteristicRead 2025-05-02 18:31:11 +02:00
Thomas KuehneandJosé Rebelo b6dadcb84f Ultrahuman: add basic support for breathing exercise 2025-05-02 08:30:04 +00:00
Thomas KuehneandJosé Rebelo 7019094f90 extend max # of DeviceCardActions from 1 to 3 2025-05-02 08:30:04 +00:00
Thomas KuehneandJosé Rebelo 7acca2dd47 enhance existing BtLE log messages
- add bonding information - `Connected to GATT server. (BOND_BONDED)`
- add read/write/etc property decoding - `characteristic: (Propr: Ultrahuman State): 86f61001-f706-58a0-95b2-1fb9261e4dc7 (read,notify)`
- decode common GATT errors encountered by InternalGattCallback and InternalGattServerCallback
2025-05-01 13:35:53 +00:00
Thomas KuehneandJosé Rebelo 742d5d96ab log more failure details in WriteAction when running on Tiramisu or higher 2025-05-01 13:35:39 +00:00
Thomas KuehneandJosé Rebelo b378a51656 BleNamesResolver: update service and characteristic UUIDs 2025-04-25 19:35:39 +00:00
Thomas Kuehne d5c632f243 fix to ensure targetCompatibility is effective for Android
PR #4735 inadvertently turned Android's targetCompatibility into Java's targetCompatibility thereby rendering it ineffective for Android.
As a result Android used the toolchain version (17) instead of targetCompatibility 1.8 to create *.class files.
See also: https://developer.android.com/build/jdks
2025-04-22 18:49:37 +02:00
Thomas Kuehne 0c415334da Ultrahuman: code review 2025-04-20 01:36:50 +02:00
Thomas Kuehne 205010b24b remove no-longer needed GenericHrvSummarySample 2025-04-20 01:26:54 +02:00
Thomas Kuehne ff761cf1e4 Ultrahuman optimizations
- fetch only new records instead of all records while the device is connected
- added PREF_POWER_SAVING support (disables / enables SpO2 sensing)
- added HRV visualization
- unified and secured Intent handling
- added BATTERY_CHARGING_FULL support
- honour PREF_TIME_SYNC in onSetTime
- various clean-ups
2025-04-20 01:12:57 +02:00
Thomas KuehneandJosé Rebelo db0d66d64c backport upstream BouncyCastle fixes
aligned with bcgit/bc-java@8b4326f247 :
- Explicitly set IV to zeros when no ParametersWithIV bcgit/bc-java@7c40b52f13
- Fix CCM input length check bcgit/bc-java@e73dbc53db
- pr-1775 fix incrementCounter bcgit/bc-java@7ad116c692
2025-04-17 21:04:15 +00:00
Thomas KuehneandJosé Rebelo c7f236790a Upgrade Gradle from 8.10.2 to 8.13
includes prerequisites:
- pcom.android.tools.build update from 8.6.1 to 8.9.1
- compileSdk update from 34 to 35 (targetSdk and minSdk are unchanged)
- .gradle and .java housekeeping fixes to reduce build warnings
2025-04-17 18:16:10 +00:00
Thomas KuehneandHosted Weblate 6e0259795e Translated using Weblate (German)
Currently translated at 98.1% (3564 of 3631 strings)

Translation: Freeyourgadget/Gadgetbridge
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/de/
2025-04-08 22:11:13 +00:00
Thomas KuehneandHosted Weblate f92aa51e2a Translated using Weblate (German)
Currently translated at 97.8% (3527 of 3604 strings)

Translation: Freeyourgadget/Gadgetbridge
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/de/
2025-04-08 22:10:51 +00:00