Repository navigation
Conversation
Lower the app minimum to API 30 while retaining compileSdk 36, targetSdk 35, and LiteRT-LM 0.16.1. Guard Android 12 SoC metadata and preserve generic CPU/GPU model selection on older devices. Start downloads below API 33 without checking the runtime notification permission, even when app notifications are disabled. Apply the same platform guard to completion notifications and cover the API 30-34 boundary. Add API 30/31 instrumented coverage, flavor-aware preference assertions, JVM regressions, and physical-device acceptance documentation. Keep upstream build tooling, source layout, and application version unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
3 of 11 tasks
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Three moderate findings, one nit, and incomplete API 30/31 device acceptance require final human review.
Review effort: Lite
Findings: None
What changed in this PR
Adds experimental Android 11/API 30 compatibility without changing the inference runtime or build toolchain.
Changes:
- Lowers
minSdkto 30 and guards SoC and notification APIs. - Adds JVM/instrumented tests and API 30/31 CI coverage.
- Updates compatibility, build, and troubleshooting documentation.
| File | Summary | Review note |
|---|---|---|
README.md |
Documents Android 11 support. | No additional finding. |
docs/TROUBLESHOOTING.md |
Adds Android 11 guidance. | No additional finding. |
docs/SDK_COMPATIBILITY.md |
Records runtime compatibility evidence. | No additional finding. |
docs/FAQ.md |
Updates platform requirements. | No additional finding. |
docs/BUILDING.md |
Adds build and device acceptance instructions. | Nit (1 vote): Qualify completion-notification checks when notifications are disabled. |
docs/ARCHITECTURE.md |
Documents the compatibility boundary. | No additional finding. |
Android/src/app/src/test/java/com/ollitert/llm/server/ui/modelmanager/AllowlistLoadCoordinatorTest.kt |
Tests unknown-SoC filtering. | No additional finding. |
Android/src/app/src/test/java/com/ollitert/llm/server/ui/common/DownloadNotificationPermissionTest.kt |
Tests notification behavior across API levels. | No additional finding. |
Android/src/app/src/test/java/com/ollitert/llm/server/data/allowlist/ModelAllowlistJsonTest.kt |
Tests generic artifact selection. | Moderate (1 vote): Pass an explicit unknown SoC to avoid dependence on process-wide SOC. |
Android/src/app/src/test/java/com/ollitert/llm/server/common/DeviceUtilsTest.kt |
Tests JVM SoC fallback behavior. | No additional finding. |
Android/src/app/src/main/java/com/ollitert/llm/server/ui/common/UiUtils.kt |
Adjusts notification permission flow. | No additional finding. |
Android/src/app/src/main/java/com/ollitert/llm/server/runtime/GpuAvailability.kt |
Uses guarded SoC diagnostics. | No additional finding. |
Android/src/app/src/main/java/com/ollitert/llm/server/data/repository/DownloadRepository.kt |
Guards completion notifications. | Moderate (1 vote): Add focused coverage for the sendNotification API guard. |
Android/src/app/src/main/java/com/ollitert/llm/server/common/DeviceUtils.kt |
Guards SoC and notification APIs. | No additional finding. |
Android/src/app/src/androidTest/java/com/ollitert/llm/server/DeviceCompatibilityTest.kt |
Adds API 30/31 compatibility checks. | No additional finding. |
Android/src/app/src/androidTest/java/com/ollitert/llm/server/data/prefs/ServerPrefsTest.kt |
Makes preference assertions flavor-aware. | No additional finding. |
Android/src/app/build.gradle.kts |
Lowers the minimum SDK to 30. | No additional finding. |
.github/workflows/instrumented-tests.yml |
Adds API 30/31 instrumented-test coverage. | Moderate (1 vote): Trigger the matrix for model_allowlists/** changes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Cover repository completion notifications across simulated API 30-34, including denied/granted permission, failure status, cancellation, foreground transitions, and observer cleanup. Keep the injected constructor and runtime SDK default unchanged. Use an explicit unknown SoC in the allowlist regression, trigger emulator tests for allowlist changes, and qualify notification visibility in the device checklist. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| PendingIntent::class, | ||
| Uri::class, | ||
| ) | ||
| mockkConstructor(NotificationCompat.Builder::class) |
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.

Breaking change
No intended breaking change. Android 11 support is experimental; Android 12+ remains recommended.
Proposed change
Allow installation on Android 11 without changing the inference runtime or build toolchain.
minSdkfrom 31 to 30; keepcompileSdk 36,targetSdk 35, and LiteRT-LM 0.16.1 unchanged.This is the Android compatibility portion of #42, rebuilt directly on upstream
mainatb49ca661. It contains no ModelScope fallback, root Gradle entry point, AGP/Gradle/JDK upgrade, or application-version change. Upstream's relocated instrumented tests and 0.9.7 version are preserved.Screenshots
N/A. No new UI is introduced.
Type of change
Additional information
Independent branch validation used upstream's AGP 9.2.0 and Gradle 9.4.1:
testDevDebugUnitTestandtestStableDebugUnitTest: each completed with 1,567 passed, 1 skipped, and no failures.lintDevDebugandlintStableDebug: no errors. No new development-variant lint findings compared with a clean upstream build.assembleDevDebugpassed; the APK declares minimum API 30, target API 35, and ARM64.A Windows sharing lock on an existing generated JAR required session-only validation output directories. No build-directory override or tooling workaround is included in this PR.
Earlier testing on a physical Smartisan Android 11 device demonstrated text serving with Gemma-4-E4B-it, including streaming, Chinese text, conversation history, error handling, and recovery after an interrupted stream. That was the combined development build, not this standalone APK. Vision/audio, background serving, broader device coverage, and the new permission flow still need on-device acceptance.
The notification review finding from #42 is addressed here. AndroidX maps
POST_NOTIFICATIONSchecks to app notification settings below API 33; the previous flow could therefore stall a download when notifications were disabled. Regression tests cover API 30, 31, 32, 33, and 34 behavior.Checklist
./gradlew :app:compileStableDebugKotlin)./gradlew lintThe unchecked items retain the remaining acceptance work: this standalone APK has not been exercised on a device, aggregate
lintwas not run, and the automated checks do not establish compatibility on every supported device.