Repository navigation
Conversation
The Activity class name was the only source of the screen name and null could not clear it, so a React Native app had no way to report or reset one; this mirrors the iOS SDK's setScreenTitle:. Released as 1.4.0.
ostfrost
marked this pull request as draft
October 21, 2026 18:36
The action's default package list includes tools, which sdkmanager no longer provides, so the step failed before the build ran.
ostfrost
marked this pull request as ready for review
October 21, 2026 19:29
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.
Purpose
Add a way to set and clear the screen name reported with App State events, mirroring the iOS SDK's
setScreenTitle:(sift-ios#167). Needed so the React Native wrapper can expose onesetPageName(name | null)with the same semantics on both platforms (MSUE-242, iOS side MSUE-243).Today the only way to set a screen name is
Sift.open(context, activityName)orSift.resume(context, activityName), and both coalesce anullname tocontext.getClass().getSimpleName(). There is no unset: in a React Native app that writes the literal context class name intoactivity_class_name. Changing that coalescing would break the documented per-Activity integration (Sift.open(this)with no name), so this adds a separate channel instead.Summary
Sift.setScreenTitle(String title): new public API. Stores a manual screen name onAppStateCollector.nullor an empty string resets it, after which the automatic Activity name is used again. It does not collect by itself; callSift.collect()to send an event right away. Called beforeSift.open(), the title is held and applied when the collector is created, following the existingunboundUserIdpattern.AppStateCollector: newvolatilefieldmanualScreenTitlewithsetManualScreenTitle(String). When buildingAndroidAppStateJson,activity_class_nameuses the manual title when set, otherwise the automatic name.open()andresume()are unchanged, so existing integrations behave exactly as before.The title is not persisted and does not survive a process restart, same as iOS.
Docs: README (custom screen name section in both integration styles), DESIGNDOC (sections 3.2, 4.1, 4.4), CHANGELOG.
CI:
android-actions/setup-android@v3now runs withpackages: ''. Its default list includestools, whichsdkmanagerno longer provides, so the job failed at that step before building; the next step already installs the packages the build needs.Versioning, for the maintainers to decide:
1.4.0as a minor release because it adds public API without breaking changes. Happy to change to1.3.2if you prefer.VERSION_CODEbumped 26 to 27 to match the previous release. Note it is not read anywhere in the build (onlyVERSION_NAMEis used, inbuildConfigFieldandmaven-push.gradle), so it can be reverted if you prefer a minimal diff.Testing
./gradlew :sift:testpasses, including three new tests inSiftTest:testManualScreenTitleOverridesActivityNametestManualScreenTitleResetFallsBackToActivityName(covers bothnulland empty string)testUnboundSetScreenTitle(title set beforeSift.open()is applied on open; resets the static Sift state via reflection so it does not depend on test order)./gradlew :sift:publishToMavenLocal, API 37 emulator,activity_class_namefrom logcat:setScreenTitle("BeforeConfig")beforeSift.open()BeforeConfigsetScreenTitle("Checkout")+collect()CheckoutSift.resume())Checkout, the manual title survives resumesetScreenTitle(null)+collect()BridgelessReactContextin React Native)hello-sifton an API 37 emulator, unchanged: app state events reportactivity_class_nameasHelloSift, thenOtherActivityafter navigating, so the automatic names are unaffected by the new code path.Checklist
hello-sift, no regression in automatic screen names)