Repository navigation
[NAPP-167] Fix the Guardian.Android sample app so it compiles and is ready for integration tests - #206
Merged
Conversation
…on tests The :app sample was the only end-to-end consumer of the SDK, but nothing built it, so it had drifted: it used the removed FirebaseInstanceId API and old dependencies, targeted SDK 33 and Java 8, and had a hardcoded tenant. The SDK (:guardian) is not touched. Build and toolchain - compileSdk/targetSdk 36, Java 17, minSdk 24 (firebase-messaging 26 requires 24). Firebase BoM 35.1.0 without firebase-core, Material, Gson, ZXing, google-services plugin bumped; explicit appcompat, activity and core. buildConfig enabled explicitly. - FCM token via FirebaseMessaging.getToken() (deprecated in 25.1+ in favour of FID registration; kept with a note because Guardian enrolls with an FCM token). Behaviour on the new target - Activity Result API for enrollment and the camera and notification permissions; POST_NOTIFICATIONS; notification channel and immutable, per-transaction PendingIntent; edge-to-edge insets. - Pushes while the app is in the background now become notifications (EventBus is only registered while visible). - Fixes found along the way: rotation re-opening the request screen, stale notifications crashing MainActivity, consent fetch off the main thread, crash on devices without a camera, DialogCallback leaking windows of dead activities. - HTTP logging only in debug builds (bodies carry tokens and secrets); backup and device transfer disabled (the enrollment holds the key). Ready for integration tests - Tenant URL configurable (-PguardianTenantUrl, gradle.properties or GUARDIAN_TENANT_URL), exposed as BuildConfig.TENANT_URL and the tenantUrl instrumentation argument. - Content descriptions and IDs on the enroll, QR scan, allow and deny controls; "Enter enrollment link" button and dialog for devices without a usable camera; ENROLLMENT_DATA intent extra for tests. - app/README.md explains configuration, the placeholder google-services.json (kept on purpose) and how to supply a real one. CI - New "sample" job in pr.yml, parallel to "test", running the new `fastlane android build_sample` lane (:app:assembleDebug), mirroring Guardian.swift#184. Co-Authored-By: Claude <noreply@anthropic.com>
Apply the Kotlin Gradle plugin (2.4.21, which supports AGP 8.12.2 and Gradle 8.13) to :app only and convert the three small helpers added in this PR from Java to Kotlin objects: - SampleGuardian: builds the Guardian client, HTTP logging debug-only. - SystemBars: edge-to-edge insets helper (enableEdgeToEdge). - EnrollmentStorage: load/save the enrollment in SharedPreferences. Each is an `object` with @JvmStatic members, so the Java activities call them unchanged. The rest of the sample and :guardian stay Java; the kotlin-gradle-plugin is only on the root buildscript classpath. Verified: the :guardian release dependency tree, generated POM, manifest and all 42 classes in the AAR are identical to origin/master; 182 SDK unit tests pass; :app builds with 0 lint errors; fastlane build_sample passes. Co-Authored-By: Claude <noreply@anthropic.com>
arunav-gandhi
requested review from
anirudh3997 and
manigandanparthasarathi-okta
October 30, 2026 05:22
manigandanparthasarathi-okta
approved these changes
Oct 30, 2026
arunav-gandhi
added a commit
that referenced
this pull request
Nov 11, 2026
arunav-gandhi
added a commit
that referenced
this pull request
Nov 11, 2026
* [NAPP-244] Fix jackson and java-jwt CVEs (ESD-71218) Bump com.auth0:java-jwt 4.6.1 -> 4.6.2 and the jackson-bom pin 2.22.2 -> 2.22.4, and declare jackson-core / jackson-databind directly (explicit 2.22.4) so Maven consumers and POM-only scanners also resolve the patched version. java-jwt 4.6.2 still pulls Jackson 2.22.3, which is affected by CVE-2026-110879. Addresses CVE-2026-85473 (java-jwt), CVE-2026-89425 and CVE-2026-89407 (jackson-core), CVE-2026-91776, CVE-2026-91777 and CVE-2026-110879 (jackson-databind). Co-Authored-By: Claude <noreply@anthropic.com> * [NAPP-244] Add Security entry to the 0.11.3 CHANGELOG section Prepare release does not rewrite an existing CHANGELOG entry (correction mode), so record the jackson / java-jwt CVE fixes here and update the date. Co-Authored-By: Claude <noreply@anthropic.com> * [NAPP-244] Add PRs merged since the 0.11.3 CHANGELOG entry was generated #188, #202, #204, #205 and #206 landed after the entry was drafted on Oct 21. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
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
Fixes the :app sample so it builds on the current Android toolchain and is ready to host the SDK's integration tests (NAPP-167).
The SDK (:guardian) is not touched. guardian/, build.sh, tools/, the release workflows and the publishing config have no changes. The release dependency tree, the
generated POM and every class in the AAR are identical to master (verified by building both and diffing).
Background
The :app sample is the only end-to-end consumer of the SDK, but nothing built it: build.sh and the fastlane lanes only assemble the library, and the SCA scan
excludes app. It had drifted: it used the removed FirebaseInstanceId API, old dependencies, SDK 33 and Java 8, had a hardcoded tenant URL, and used deprecated APIs
(startActivityForResult, PreferenceManager, un-flagged PendingIntent). This brings it back and adds a CI job so it cannot silently break again.
What changed
Build and toolchain
Behaviour on the new target
Ready for integration tests
BuildConfig.TENANT_URL and the tenantUrl instrumentation argument. The hardcoded guardian.xml is gone.
Guardian.swift#184, plus an ENROLLMENT_DATA intent extra for instrumentation tests (EnrollActivity is not exported).
app/src/debug/google-services.json. app/README.md documents configuration, the manual test flow and the test hooks.
CI
step can no longer hide a broken sample, and the reverse. This mirrors Guardian.swift#184.
Alternatives considered
iOS PR.
References
Testing
How to test
Verified locally
Checklist