[Feature][Android] Add pre-load Lynx view lifecycle - #119
Merged
Conversation
Summary of change: - Expose a Java-friendly created-view listener on SparklingContext. - Notify hosts after Sparkling bridge initialization and before post-create/load. - Preserve existing behavior when no listener is provided. - Cover callback order, bridge availability, view identity, and defaults. TEST: ./gradlew :sparkling:testDebugUnitTest --tests com.tiktok.sparkling.hybridkit.HybridKitTest --no-daemon TEST: PATH=/tmp/sparkling-ktlint-bin:$PATH scripts/lint.sh kotlin Co-authored-by: TRAE CLI <noreply@bytedance.com>
Huxpro
force-pushed
the
agent/android-lynx-builder-config
branch
from
August 8, 2026 19:03
1184c8b to
9569434
Compare
YJ-Hao
approved these changes
Aug 11, 2026
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
Add a Java-friendly pre-load Lynx view lifecycle seam for Android hosts.
This is a deliberately narrow foundation layer. It does not expose
LynxViewBuilderor add thread, viewport, density, resource-fetcher, module, or background-runtime behavior.Related issues
Standalone host-integration enhancement. Follow-up PRs will implement and validate individual capabilities directly in
HybridLynxKit; density will use a separate shared-process policy.Changes
SparklingLynxViewCreatedListenertoSparklingContext.onPostKitCreatedor template loading.How to test
cd packages/playground/android && ./gradlew :sparkling:testDebugUnitTest --tests com.tiktok.sparkling.hybridkit.HybridKitTest --no-daemonPATH=/tmp/sparkling-ktlint-bin:$PATH scripts/lint.sh kotlinBoth checks passed on the Android devbox using ktlint 1.8.0, matching CI.
Checklist
CONTRIBUTING.md.Expanded durable device validation
The checked-in SG1 + Lynx Sandbox matrix in #131 now validates exact commit
df875a87541d587ab8aa84a86600c0610f9e44c7with 10/10 PASS onaries_10(Android 10 / API 29). Added runtime coverage includes: the pre-load listener observing a ready bridge before template fetch; the global per-page fetcher factory; real first-screen rendering forALL_ON_UI,MOST_ON_TASM,PART_ON_LAYOUT, and safeMULTI_THREADS; and full-page fixed-viewport +MULTI_THREADSrejection before Activity launch or transfer-station save. The runner requires a clean exact HEAD and fails closed unless Sandbox release confirms the leased serial. Evidence:/tmp/sparkling-android-device-acceptance-df875a8; archive SHA-256712a3b83dbd78eabeae9afc0766b5b191cee0bff10e515967b3ae9f46c4feb98.