feat(samples): Distinguish debug and release builds of the Android sample#5724
Merged
Conversation
Contributor
|
📲 Install BuildsAndroid
|
b1c8333 to
12cdeeb
Compare
…mple Give the Android sample a `.debug` application id suffix and a "Sentry Sample Debug" launcher label so debug and release builds can be installed side by side and told apart on the home screen. Add a build type badge (DEBUG/RELEASE) under the Sentry logo in the navigation rail so the running build is visible inside the app too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
12cdeeb to
0e75a12
Compare
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3d205d0 | 352.15 ms | 432.53 ms | 80.38 ms |
| e59e22a | 368.02 ms | 432.00 ms | 63.98 ms |
| 806307f | 357.85 ms | 424.64 ms | 66.79 ms |
| d364ace | 384.53 ms | 453.51 ms | 68.98 ms |
| 4c04bb8 | 307.93 ms | 362.34 ms | 54.41 ms |
| bb0ff41 | 312.86 ms | 363.78 ms | 50.92 ms |
| 91bb874 | 310.68 ms | 359.24 ms | 48.56 ms |
| 11f90db | 314.26 ms | 372.43 ms | 58.17 ms |
| f6cdbf0 | 314.19 ms | 357.59 ms | 43.40 ms |
| 8687935 | 332.52 ms | 362.23 ms | 29.71 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3d205d0 | 1.58 MiB | 2.10 MiB | 532.97 KiB |
| e59e22a | 1.58 MiB | 2.20 MiB | 635.34 KiB |
| 806307f | 1.58 MiB | 2.10 MiB | 533.42 KiB |
| d364ace | 1.58 MiB | 2.11 MiB | 539.75 KiB |
| 4c04bb8 | 0 B | 0 B | 0 B |
| bb0ff41 | 0 B | 0 B | 0 B |
| 91bb874 | 1.58 MiB | 2.13 MiB | 559.07 KiB |
| 11f90db | 0 B | 0 B | 0 B |
| f6cdbf0 | 0 B | 0 B | 0 B |
| 8687935 | 1.58 MiB | 2.19 MiB | 619.17 KiB |
romtsn
approved these changes
Jul 7, 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.
📜 Description
Makes the debug and release builds of the Android sample app distinguishable:
.debugapplication id suffix (io.sentry.samples.android.debug), so debug and release can be installed side by side.app_nameis defined per build type via source-set resources (src/debug/src/release) —Sentry Sample Debugfor debug,Sentry Samplefor release. The manifest keepsandroid:label="@string/app_name".DEBUG/RELEASEbadge is shown under the Sentry logo in the navigation rail. Its text comes from a per-build-typebuild_typestring resource; the badge color is keyed onBuildConfig.DEBUG(red for debug, primary for release).💡 Motivation and Context
When testing SDK changes it's common to have both a debug and a release build of the sample on the same device. Previously they shared an application id and launcher name, so they couldn't coexist and were easy to confuse. This makes it clear at a glance which build you're looking at, both on the home screen and inside the app.
💚 How did you test it?
Built and installed the debug build on an emulator. Verified via
aapt2 dump badgingthat it resolves to packageio.sentry.samples.android.debugand labelSentry Sample Debug, coexisting with a release build (io.sentry.samples.android/Sentry Sample). Confirmed both variants process resources cleanly and the redDEBUGbadge renders in-app.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The Maestro flow in
sentry-samples/sentry-samples-android/maestrousesappId: io.sentry.samples.android, which now matches the release build only. It is a manually-run dev tool (not in CI); run it against a release build, or point it at the.debugid when testing debug.Ref: JAVA-631
#skip-changelog