Skip to content

Raise minSdk to 27 and drop the Android 8.0 GATT workaround - #150

Merged
dzid26 merged 1 commit into
mainfrom
work/min-sdk-27
Oct 8, 2026
Merged

dzid26 merged 1 commit into
mainfrom
work/min-sdk-27

Conversation

@dzid26

@dzid26 dzid26 commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follows #133. This is the owner's decision: the app now needs Android 8.1 (API 27).

  • Why it's safe. On Android 8.0, BluetoothGatt.onNotify stores 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.
  • What changed.
    • TeslaGattClient always connects with the 6-arg connectGatt(…, handler).
    • The 8.0-only binder callback and postToMain are removed (−94 lines).
    • Android 8.0 was about 0.8% of active devices in Google's Dec 2025 data.
  • Docs. The README badge, docs/compatibility.md, the F-Droid description, AGENTS.md and a backup-rules comment now say 8.1+ (API 27).

Type

  • Bug fix
  • Feature
  • Protocol / crypto change
  • Docs / CI / tooling
  • Refactor (no behavior change on supported versions)

Testing

Checklist

  • Protocol changes ship test vectors; expected.txt regenerated, not hand-edited (n/a)
  • No VINs, keys, or decrypted payloads in logs
  • Docs/master-plan updated where relevant
  • New source files carry SPDX-License-Identifier: AGPL-3.0-only (n/a)

🤖 Generated with Claude Code

https://claude.ai/code/session_0129RzhbEE2cboMcYyZMuxqX


Generated by Claude Code

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
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Screenshots

App screenshots: light and dark

Captured from the demo build at 42ac079.

Debug APK: zip from Android CI (GitHub sign-in needed)

@dzid26
dzid26 merged commit 150f4f2 into main Oct 8, 2026
5 checks passed
@dzid26
dzid26 deleted the work/min-sdk-27 branch October 8, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants