diff --git a/docs/platforms/android/user-feedback/configuration/index.mdx b/docs/platforms/android/user-feedback/configuration/index.mdx index 3702cc9474eb9..d9302195e9b6e 100644 --- a/docs/platforms/android/user-feedback/configuration/index.mdx +++ b/docs/platforms/android/user-feedback/configuration/index.mdx @@ -99,6 +99,7 @@ You can customize which form elements are shown, whether they are required, and | `showName` | `Bool` | `true` | Displays the name field on the feedback form. Ignored if `isNameRequired` is `true`. | | `isEmailRequired` | `Bool` | `false` | Requires the email field on the feedback form to be filled in. | | `showEmail` | `Bool` | `true` | Displays the email field on the feedback form. Ignored if `isEmailRequired` is `true`. | +| `useShakeGesture` | `Bool` | `false` | Opens the feedback form when the user shakes the device. Uses the accelerometer and requires no additional permissions. | | `useSentryUser` | `Bool` | `true` | Sets the `email` and `name` fields to the corresponding Sentry SDK user fields that were called with `SentrySDK.setUser`. | Example: @@ -111,6 +112,7 @@ Example: + ``` ```java @@ -121,6 +123,7 @@ SentryAndroid.init(context, options -> { options.getFeedbackOptions().setShowEmail(false); options.getFeedbackOptions().setUseSentryUser(false); options.getFeedbackOptions().setShowBranding(false); + options.getFeedbackOptions().setUseShakeGesture(true); }); ``` ```kotlin @@ -131,6 +134,7 @@ SentryAndroid.init(this) { options -> options.feedbackOptions.isShowEmail = false options.feedbackOptions.isUseSentryUser = false options.feedbackOptions.isShowBranding = false + options.feedbackOptions.isUseShakeGesture = true } ``` diff --git a/docs/platforms/android/user-feedback/index.mdx b/docs/platforms/android/user-feedback/index.mdx index 90b4692e5fb99..b3ecd26742a96 100644 --- a/docs/platforms/android/user-feedback/index.mdx +++ b/docs/platforms/android/user-feedback/index.mdx @@ -44,6 +44,26 @@ val widget = SentryUserFeedbackButton(context) ``` +## Shake to Report + +You can enable shake-to-report so that shaking the device opens the User Feedback form. This uses the device's accelerometer and does not require any additional permissions. + +```java +SentryAndroid.init(context, options -> { + options.getFeedbackOptions().setUseShakeGesture(true); +}); +``` +```kotlin +SentryAndroid.init(this) { options -> + options.feedbackOptions.isUseShakeGesture = true +} +``` +```xml {filename:AndroidManifest.xml} + + + +``` + ## User Feedback Form The User Feedback form allows users to submit feedback from anywhere inside your application.