Skip to content

Commit aca6cb5

Browse files
Demo capturing screenshots in guides for .net mobile apps (#17035)
Resolves #4117 - #4117 ## IS YOUR CHANGE URGENT? - [ ] None: Not urgent, can wait up to 1 week+ ## SLA cc: @Flash0ver ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: J-P Nurmi <jpnurmi@gmail.com>
1 parent a0974e2 commit aca6cb5

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

docs/platforms/dotnet/guides/android/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ public class MainActivity : Activity
5959
// Native Android SDK options are available via options.Native
6060
options.Native.AnrEnabled = true;
6161

62+
// If your app doesn't have sensitive data, you can attach screenshots automatically when a Java/native
63+
// error is captured.
64+
// https://docs.sentry.io/platforms/android/configuration/options/#attachScreenshot
65+
options.Native.AttachScreenshot = true;
66+
6267
// Session Replay is currently available via the ExperimentalOptions
6368
options.Native.ExperimentalOptions.SessionReplay.OnErrorSampleRate = 1.0;
6469
options.Native.ExperimentalOptions.SessionReplay.SessionSampleRate = 1.0;

docs/platforms/dotnet/guides/apple/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ public class AppDelegate : UIApplicationDelegate
5353
// Native Apple SDK options are available via options.Native
5454
options.Native.EnableAppHangTracking = true;
5555

56+
// If your app doesn't have sensitive data, you can get screenshots on error events automatically
57+
// https://docs.sentry.io/platforms/apple/guides/ios/configuration/options/#attachScreenshot
58+
options.Native.AttachScreenshot = true;
59+
5660
options.SetBeforeSend(evt =>
5761
{
5862
if (evt.Exception?.Message.Contains("Something you don't care want logged?") ?? false)

docs/platforms/dotnet/guides/maui/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ public static MauiApp CreateMauiApp()
7373
options.TracesSampleRate = 1.0;
7474
// ___PRODUCT_OPTION_END___ performance
7575
76+
// If your app doesn't have sensitive data, you can get screenshots on error events automatically
77+
// https://docs.sentry.io/platforms/dotnet/guides/maui/configuration/options/#AttachScreenshot
78+
options.AttachScreenshot = true;
79+
7680
// Other Sentry options can be set here.
7781
})
7882

0 commit comments

Comments
 (0)