Repository navigation
Raise minSdk to 27 and drop the Android 8.0 GATT workaround - #150
Merged
Merged
Conversation
Owner decision after #133. On Android 8.0, BluetoothGatt.onNotify stores a notification's value in the shared characteristic on the Binder thread before posting the callback, so #133 took callbacks on the Binder thread there. From 8.1 (AOSP oreo-mr1) the value is set inside the posted runnable, so the main-looper Handler is safe on every supported version and the 8.0 path (about 90 lines) goes. Android 8.0 is under 1% of active devices. README badge, docs/compatibility.md, the F-Droid description, AGENTS.md and a backup-rules comment now say Android 8.1+ (API 27). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129RzhbEE2cboMcYyZMuxqX
Contributor
ScreenshotsCaptured from the demo build at 42ac079. Debug APK: zip from Android CI (GitHub sign-in needed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Follows #133. This is the owner's decision: the app now needs Android 8.1 (API 27).
BluetoothGatt.onNotifystores a notification's value in the shared characteristic on the Binder thread before it posts the callback (8.0 source). Run GATT callbacks on the main thread and serialize setup #133 therefore took callbacks on the Binder thread on 8.0. From 8.1, the value is set inside the posted runnable (8.1 source), so the main-looper Handler is safe on every supported version.TeslaGattClientalways connects with the 6-argconnectGatt(…, handler).postToMainare removed (−94 lines).docs/compatibility.md, the F-Droid description, AGENTS.md and a backup-rules comment now say 8.1+ (API 27).Type
Testing
:core:test,:app:testDebugUnitTest,:app:assembleDebug,:app:lintDebug, ktlint and detekt.Checklist
expected.txtregenerated, not hand-edited (n/a)SPDX-License-Identifier: AGPL-3.0-only(n/a)🤖 Generated with Claude Code
https://claude.ai/code/session_0129RzhbEE2cboMcYyZMuxqX
Generated by Claude Code