Package 

Class SentryScreenshotOptions


  • 
    public final class SentryScreenshotOptions
    extends SentryMaskingOptions
                        

    Screenshot masking options for error screenshots. Extends the base SentryMaskingOptions with screenshot-specific defaults.

    By default, masking is disabled for screenshots. Enable masking by calling and/or setMaskAllImages.

    Note: Screenshot masking requires the {@code sentry-android-replay} module to be present at runtime. If the replay module is not available, screenshots will be captured without masking.

    • Method Summary

      Modifier and Type Method Description
      void trackCustomMasking()
      void setMaskAllImages(boolean maskAllImages) When enabling image masking for screenshots, this also adds masking for WebView, VideoView,and media player views (ExoPlayer, Media3) since they may contain sensitive content.
      • Methods inherited from class io.sentry.SentryMaskingOptions

        addMaskViewClass, addUnmaskViewClass, getMaskViewClasses, getMaskViewContainerClass, getUnmaskViewClasses, getUnmaskViewContainerClass, setMaskAllImages, setMaskAllText, setMaskViewContainerClass, setUnmaskViewContainerClass, trackCustomMasking
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SentryScreenshotOptions

        SentryScreenshotOptions()
    • Method Detail

      • setMaskAllImages

         void setMaskAllImages(boolean maskAllImages)

        When enabling image masking for screenshots, this also adds masking for WebView, VideoView,and media player views (ExoPlayer, Media3) since they may contain sensitive content.