Skip to content

Commit c34e522

Browse files
committed
updated Android user feedback static API
1 parent a423ee5 commit c34e522

File tree

1 file changed

+12
-4
lines changed
  • docs/platforms/android/user-feedback

1 file changed

+12
-4
lines changed

docs/platforms/android/user-feedback/index.mdx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,24 @@ The User Feedback form allows users to submit feedback from anywhere inside your
4646
For the configuration options, please refer to the <PlatformLink to="/user-feedback/configuration/">User Feedback Widget Configuration</PlatformLink>.
4747

4848
```java
49-
import io.sentry.android.core.SentryUserFeedbackDialog;
49+
import io.sentry.Sentry;
5050

51+
SentryId sentryId = Sentry.captureMessage("My message"); // You can optionally associate an event using its id
5152
// Just instantiate the dialog and show it whenever you want
52-
new SentryUserFeedbackDialog.Builder(context).create().show();
53+
Sentry.showUserFeedbackDialog(sentryId, options -> {
54+
// The options set here will be applied to the current form only
55+
options.setFormTitle("We want to hear from you!");
56+
});
5357
```
5458
```kotlin
55-
import io.sentry.android.core.SentryUserFeedbackDialog
59+
import io.sentry.Sentry
5660

61+
val sentryId = Sentry.captureMessage("My message") // You can optionally associate an event using its id
5762
// Just instantiate the dialog and show it whenever you want
58-
SentryUserFeedbackDialog.Builder(context).create().show()
63+
Sentry.showUserFeedbackDialog(sentryId) { options ->
64+
// The options set here will be applied to the current form only
65+
options.formTitle = "We want to hear from you!"
66+
}
5967
```
6068

6169
### Session Replay

0 commit comments

Comments
 (0)