diff --git a/samples/Sentry.Samples.Android/MainActivity.cs b/samples/Sentry.Samples.Android/MainActivity.cs index 5fc26de941..b2bd90ce0a 100644 --- a/samples/Sentry.Samples.Android/MainActivity.cs +++ b/samples/Sentry.Samples.Android/MainActivity.cs @@ -31,6 +31,11 @@ protected override void OnCreate(Bundle? savedInstanceState) // Enable Native Android SDK ANR detection options.Native.AnrEnabled = true; + // If your app doesn't have sensitive data, you can attach screenshots automatically when a Java/native + // error is captured. + // https://docs.sentry.io/platforms/android/configuration/options/#attachScreenshot + options.Native.AttachScreenshot = true; + // Currently experimental support is only available on Android options.Native.ExperimentalOptions.SessionReplay.OnErrorSampleRate = 1.0; options.Native.ExperimentalOptions.SessionReplay.SessionSampleRate = 1.0; diff --git a/samples/Sentry.Samples.Ios/AppDelegate.cs b/samples/Sentry.Samples.Ios/AppDelegate.cs index cb7bf2cc8a..007945f6ec 100644 --- a/samples/Sentry.Samples.Ios/AppDelegate.cs +++ b/samples/Sentry.Samples.Ios/AppDelegate.cs @@ -36,6 +36,10 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary? // Enable Native iOS SDK App Hangs detection options.Native.EnableAppHangTracking = true; + // If your app doesn't have sensitive data, you can get screenshots on error events automatically + // https://docs.sentry.io/platforms/apple/guides/ios/configuration/options/#attachScreenshot + options.Native.AttachScreenshot = true; + options.CacheDirectoryPath = Path.GetTempPath(); options.SetBeforeSend(evt => diff --git a/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs b/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs index c02e015acf..53c2f22ad2 100644 --- a/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs +++ b/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs @@ -23,6 +23,10 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary? options.Dsn = EnvironmentVariables.Dsn; #endif options.Debug = true; + + // If your app doesn't have sensitive data, you can get screenshots on error events automatically + // https://docs.sentry.io/platforms/apple/guides/ios/configuration/options/#attachScreenshot + options.Native.AttachScreenshot = true; }); // Try out the Sentry SDK diff --git a/samples/Sentry.Samples.Maui/MauiProgram.cs b/samples/Sentry.Samples.Maui/MauiProgram.cs index c1789d3850..de3abb8c74 100644 --- a/samples/Sentry.Samples.Maui/MauiProgram.cs +++ b/samples/Sentry.Samples.Maui/MauiProgram.cs @@ -30,7 +30,8 @@ public static MauiApp CreateMauiApp() // If you want to see everything we can capture from MAUI, you may wish to use a larger value. options.MaxBreadcrumbs = 1000; - // Be aware that screenshots may contain PII + // If your app doesn't have sensitive data, you can get screenshots on error events automatically + // https://docs.sentry.io/platforms/dotnet/guides/maui/configuration/options/#AttachScreenshot options.AttachScreenshot = true; options.Debug = true;