Skip to content

Conversation

tustanivsky
Copy link
Collaborator

@tustanivsky tustanivsky commented Oct 1, 2025

This PR adds automatic screenshot capturing for ensure and assertion events on Android.

Screenshot capturing on crash events isn’t supported since there’s no way to hook into the crash handler early enough. Unlike on iOS, setting a custom signal handler doesn’t help - by that point it’s already too late to allocate image buffers or perform file I/O.

Note: Currently, screenshot attachments are built from byte buffers rather than file paths since the Android SDK doesn’t provide a way to know when the upload has finished and it’s safe to delete the screenshot file. Clearing attachments at application launch can also be unsafe since assertions are sent roughly at the same time during SDK initialization.

Docs: getsentry/sentry-docs#15107

Closes #567

Copy link
Contributor

github-actions bot commented Oct 1, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 9851487

@tustanivsky tustanivsky marked this pull request as ready for review October 1, 2025 11:02
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Collaborator

@limbonaut limbonaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tustanivsky tustanivsky merged commit b7039dd into main Oct 3, 2025
3 checks passed
@tustanivsky tustanivsky deleted the feat/android-scr branch October 3, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Screenshots as attachment
4 participants