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
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.
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
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
Switch the Java toolchain to version 21 - the version shipped with current AndroidStudio releases.
Disable Java 1.8 warnings - see discussion in PR #4735
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.
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
- 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
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