Skip to content

Commit e24f8a1

Browse files
authored
Update Android User Feedback static API (#14464)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR We introduced a new static API to show the user feedback form in Android, to simplify usage. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## 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) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 4c26b4a commit e24f8a1

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)