Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add before-capture-callback and debouncing for screenshots/view hierarchy #135

Open
3 of 5 tasks
markushi opened this issue Jun 28, 2023 · 1 comment
Open
3 of 5 tasks

Comments

@markushi
Copy link
Member

markushi commented Jun 28, 2023

Right now there's little control over when screenshots or view hierarchies are captured. This can have a negative impact on the app performance itself (capturing many screenshots, contribution to quota) as well as the usability of the feature itself (no control when a screenshot should be taken or not).

Internal decision doc

Solution

  • Add debouncing mechanism
  • Introduce a BeforeCaptureCallback

Related Android PR: getsentry/sentry-java#2773

Tasks

  1. Platform: Cocoa Type: Feature Request
    philipphofmann
  2. Platform: Dart
    denrase
  3. Platform: React-Native
@markushi markushi changed the title Add before-capture callbacks and debouncing for screenshots/view hierarchy Add before-capture-callback and debouncing for screenshots/view hierarchy Jun 28, 2023
@stefanosiano
Copy link
Member

Just a small explanation on what was done in Android.
We now have options.setBeforeScreenshotCaptureCallback and options.setBeforeViewHierarchyCaptureCallback
These callbacks have these parameters: event, hint and debounce (a flag which says the screenshot/vh should be debounced and ignored)
The callback can overwrite the debounce mechanism, forcing the screenshot/vh to be taken, or make it completely skipped.
here is the code for screenshots and view hierarchy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

4 participants