feat(android): cross-activity show, lifecycle, and webview retention#121
Open
jboileau99 wants to merge 20 commits into
Open
feat(android): cross-activity show, lifecycle, and webview retention#121jboileau99 wants to merge 20 commits into
jboileau99 wants to merge 20 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
alexchavez1
approved these changes
Jun 17, 2026
Add run-sample.sh with UID-based logcat, Makefile targets for sample apps and integration tests, trim READMEs to make-only commands, remove legacy run-integration-tests.sh, and add shared preferences logging to the standard sample app (merged with cross-activity SecondActivity flow). Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
ethanpschoen
force-pushed
the
justin/feat/cross-activity-lifecycle
branch
from
July 7, 2026 17:25
8c8d6ec to
e9a46ec
Compare
ethanpschoen
force-pushed
the
justin/feat/cross-activity-lifecycle
branch
from
July 21, 2026 17:49
08a18f2 to
48815f0
Compare
When jurisdiction/environment aren't fully set, getFullConfiguration() falls back to the short config.json path, which previously carried no language hint. Native HTTP stacks (OkHttp) don't send Accept-Language, so the server silently defaulted to "en" on non-English devices. Now the short path always sends a language query param: the explicit languageCode if set, otherwise the device locale (formatted to match ketch-tag's formatLanguage convention). jurisdiction/region are forwarded when explicitly set. The full static path is unchanged.
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.
Description of this change
Why is this change being made?
How was this tested? How can the reviewer verify your testing?
./gradlew ktlintCheck— pass./gradlew :integration-tests:connectedDebugAndroidTest— pass on Pixel 9a (API 16) emulator, includingZCrossActivityShowTest,ZWebViewRetentionTest, andZPreferenceTabArgsTestRelated issues
N/A
Checklist
Note
High Risk
Large behavioral changes to Activity/WebView/dialog lifecycle and public init patterns affect every integrator; mistaken auto-dismiss or WebView retention could strand UI or leak context, though new instrumented coverage targets the main paths.
Overview
The SDK no longer requires a
FragmentManagerat create time:KetchLifecycleTrackertracks the foregroundFragmentActivity, andKetchSdk.create(context, …)is the primary factory (theFragmentManageroverload is deprecated). Experiences can be shown from any activity; navigating to another activity while a dialog is open auto-dismisses withonDismiss(HideExperienceStatus.ActivityChanged), while rotation and backgrounding keep the experience alive.WebView lifecycle is reworked around a
loadedSignaturecache: matching config reuses a warm WebView via imperativeketch('showConsent')/showPreferencesJS instead of reloading.hideExperienceretains the WebView for fast re-show and trailing bridge events; other dismiss paths (dismissDialog, renderer gone, config invalidation) tear it down. Tap-outside dismissal and thetapOutsideJS bridge are removed.Supporting changes include
setWebResourceUrlOverrides(HTML +WebResourceOverrideHandler),IntegrationTestApp-based harness withZ*instrumented tests (cross-activity, auto-dismiss, benign lifecycle, retention, preference tabs), sample apps on Application-scopedKetch, Makefile / run-sample tooling, Cursor rules/skills, and README integration docs.Reviewed by Cursor Bugbot for commit 8c8d6ec. Configure here.