Package io.sentry
Class SentryFeedbackOptions
java.lang.Object
io.sentry.SentryFeedbackOptions
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSentryFeedbackOptions
(@NotNull SentryFeedbackOptions other) Creates a copy of the passedSentryFeedbackOptions
. -
Method Summary
Modifier and TypeMethodDescription@NotNull CharSequence
The label of the cancel button.@NotNull CharSequence
The label next to the email input field.@NotNull CharSequence
The placeholder in the email input field.@NotNull CharSequence
The title of the feedback form.@NotNull CharSequence
The text to attach to the title label for a required field.@NotNull CharSequence
The label of the feedback description input field.@NotNull CharSequence
The placeholder in the feedback description input field.@NotNull CharSequence
The label next to the name input field.@NotNull CharSequence
The placeholder in the name input field.@Nullable Runnable
Callback called when the feedback form is closed.@Nullable Runnable
Callback called when the feedback form is opened.Callback called when there is an error submitting feedback via the prepared form.Callback called when feedback is successfully submitted via the prepared form.@NotNull CharSequence
The label of the submit button.@NotNull CharSequence
The message displayed after a successful feedback submission.boolean
Requires the email field on the feedback form to be filled in.boolean
Requires the name field on the feedback form to be filled in.boolean
Displays the Sentry logo inside of the form.boolean
Displays the email field on the feedback form.boolean
Displays the name field on the feedback form.boolean
Sets the email and name fields to the corresponding Sentry SDK user fields that were called with SentrySDK.setUser.void
setCancelButtonLabel
(@NotNull CharSequence cancelButtonLabel) Sets the label of the cancel button.void
setEmailLabel
(@NotNull CharSequence emailLabel) Sets the label next to the email input field.void
setEmailPlaceholder
(@NotNull CharSequence emailPlaceholder) Sets the placeholder in the email input field.void
setEmailRequired
(boolean isEmailRequired) Sets whether the email field on the feedback form is required.void
setFormTitle
(@NotNull CharSequence formTitle) Sets the title of the feedback form.void
setIsRequiredLabel
(@NotNull CharSequence isRequiredLabel) Sets the text to attach to the title label for a required field.void
setMessageLabel
(@NotNull CharSequence messageLabel) Sets the label of the feedback description input field.void
setMessagePlaceholder
(@NotNull CharSequence messagePlaceholder) Sets the placeholder in the feedback description input field.void
setNameLabel
(@NotNull CharSequence nameLabel) Sets the label next to the name input field.void
setNamePlaceholder
(@NotNull CharSequence namePlaceholder) Sets the placeholder in the name input field.void
setNameRequired
(boolean isNameRequired) Sets whether the name field on the feedback form is required.void
setOnFormClose
(@Nullable Runnable onFormClose) Sets the callback to be called when the feedback form is closed.void
setOnFormOpen
(@Nullable Runnable onFormOpen) Sets the callback to be called when the feedback form is opened.void
setOnSubmitError
(@Nullable SentryFeedbackOptions.SentryFeedbackCallback onSubmitError) Sets the callback to be called when there is an error submitting feedback via the prepared form.void
setOnSubmitSuccess
(SentryFeedbackOptions.SentryFeedbackCallback onSubmitSuccess) Sets the callback to be called when feedback is successfully submitted via the prepared form.void
setShowBranding
(boolean showBranding) Sets whether the Sentry logo is shown inside of the form.void
setShowEmail
(boolean showEmail) Sets whether the email field on the feedback form is shown.void
setShowName
(boolean showName) Sets whether the name field on the feedback form is shown.void
setSubmitButtonLabel
(@NotNull CharSequence submitButtonLabel) Sets the label of the submit button.void
setSuccessMessageText
(@NotNull CharSequence successMessageText) Sets the message displayed after a successful feedback submission.void
setUseSentryUser
(boolean useSentryUser) Sets whether the email and name fields are set to the corresponding Sentry SDK user fields that were called with SentrySDK.setUser.toString()
-
Constructor Details
-
SentryFeedbackOptions
public SentryFeedbackOptions() -
SentryFeedbackOptions
Creates a copy of the passedSentryFeedbackOptions
.
-
-
Method Details
-
isNameRequired
public boolean isNameRequired()Requires the name field on the feedback form to be filled in. Defaults to false.- Returns:
- true if the name field is required
-
setNameRequired
public void setNameRequired(boolean isNameRequired) Sets whether the name field on the feedback form is required. Defaults to false.- Parameters:
isNameRequired
- true if the name field is required
-
isShowName
public boolean isShowName()Displays the name field on the feedback form. Ignored if isNameRequired is true. Defaults to true.- Returns:
- true if the name field is shown
-
setShowName
public void setShowName(boolean showName) Sets whether the name field on the feedback form is shown. Ignored if isNameRequired is true. Defaults to true.- Parameters:
showName
- true if the name field is shown
-
isEmailRequired
public boolean isEmailRequired()Requires the email field on the feedback form to be filled in. Defaults to false.- Returns:
- true if the email field is required
-
setEmailRequired
public void setEmailRequired(boolean isEmailRequired) Sets whether the email field on the feedback form is required. Defaults to false.- Parameters:
isEmailRequired
- true if the email field is required
-
isShowEmail
public boolean isShowEmail()Displays the email field on the feedback form. Ignored if isEmailRequired is true. Defaults to true.- Returns:
- true if the email field is shown
-
setShowEmail
public void setShowEmail(boolean showEmail) Sets whether the email field on the feedback form is shown. Ignored if isEmailRequired is true. Defaults to true.- Parameters:
showEmail
- true if the email field is shown
-
isUseSentryUser
public boolean isUseSentryUser()Sets the email and name fields to the corresponding Sentry SDK user fields that were called with SentrySDK.setUser. Defaults to true.- Returns:
- true if the email and name fields are set to the Sentry SDK user fields
-
setUseSentryUser
public void setUseSentryUser(boolean useSentryUser) Sets whether the email and name fields are set to the corresponding Sentry SDK user fields that were called with SentrySDK.setUser. Defaults to true.- Parameters:
useSentryUser
- true if the email and name fields are set to the Sentry SDK user fields
-
isShowBranding
public boolean isShowBranding()Displays the Sentry logo inside of the form. Defaults to true.- Returns:
- true if the Sentry logo is shown
-
setShowBranding
public void setShowBranding(boolean showBranding) Sets whether the Sentry logo is shown inside of the form. Defaults to true.- Parameters:
showBranding
- true if the Sentry logo is shown
-
getFormTitle
The title of the feedback form. Defaults to "Report a Bug".- Returns:
- the title of the feedback form
-
setFormTitle
Sets the title of the feedback form.- Parameters:
formTitle
- the title of the feedback form
-
getSubmitButtonLabel
The label of the submit button. Defaults to "Send Bug Report".- Returns:
- the label of the submit button
-
setSubmitButtonLabel
Sets the label of the submit button. Defaults to "Send Bug Report".- Parameters:
submitButtonLabel
- the label of the submit button
-
getCancelButtonLabel
The label of the cancel button. Defaults to "Cancel".- Returns:
- the label of the cancel button
-
setCancelButtonLabel
Sets the label of the cancel button.- Parameters:
cancelButtonLabel
- the label of the cancel button
-
getNameLabel
The label next to the name input field. Defaults to "Name".- Returns:
- the label next to the name input field
-
setNameLabel
Sets the label next to the name input field.- Parameters:
nameLabel
- the label next to the name input field
-
getNamePlaceholder
The placeholder in the name input field. Defaults to "Your Name".- Returns:
- the placeholder in the name input field
-
setNamePlaceholder
Sets the placeholder in the name input field.- Parameters:
namePlaceholder
- the placeholder in the name input field
-
getEmailLabel
The label next to the email input field. Defaults to "Email".- Returns:
- the label next to the email input field
-
setEmailLabel
Sets the label next to the email input field.- Parameters:
emailLabel
- the label next to the email input field
-
getEmailPlaceholder
The placeholder in the email input field. Defaults to "[email protected]".- Returns:
- the placeholder in the email input field
-
setEmailPlaceholder
Sets the placeholder in the email input field.- Parameters:
emailPlaceholder
- the placeholder in the email input field
-
getIsRequiredLabel
The text to attach to the title label for a required field. Defaults to " (Required)".- Returns:
- the text to attach to the title label for a required field
-
setIsRequiredLabel
Sets the text to attach to the title label for a required field.- Parameters:
isRequiredLabel
- the text to attach to the title label for a required field
-
getMessageLabel
The label of the feedback description input field. Defaults to "Description".- Returns:
- the label of the feedback description input field
-
setMessageLabel
Sets the label of the feedback description input field.- Parameters:
messageLabel
- the label of the feedback description input field
-
getMessagePlaceholder
The placeholder in the feedback description input field. Defaults to "What's the bug? What did you expect?".- Returns:
- the placeholder in the feedback description input field
-
setMessagePlaceholder
Sets the placeholder in the feedback description input field.- Parameters:
messagePlaceholder
- the placeholder in the feedback description input field
-
getSuccessMessageText
The message displayed after a successful feedback submission. Defaults to "Thank you for your report!".- Returns:
- the message displayed after a successful feedback submission
-
setSuccessMessageText
Sets the message displayed after a successful feedback submission.- Parameters:
successMessageText
- the message displayed after a successful feedback submission
-
getOnFormOpen
Callback called when the feedback form is opened.- Returns:
- the callback to be called when the feedback form is opened
-
setOnFormOpen
Sets the callback to be called when the feedback form is opened.- Parameters:
onFormOpen
- the callback to be called when the feedback form is opened
-
getOnFormClose
Callback called when the feedback form is closed.- Returns:
- the callback to be called when the feedback form is closed
-
setOnFormClose
Sets the callback to be called when the feedback form is closed.- Parameters:
onFormClose
- the callback to be called when the feedback form is closed
-
getOnSubmitSuccess
Callback called when feedback is successfully submitted via the prepared form.- Returns:
- the callback to be called when feedback is successfully submitted via the prepared form
-
setOnSubmitSuccess
public void setOnSubmitSuccess(@Nullable SentryFeedbackOptions.SentryFeedbackCallback onSubmitSuccess) Sets the callback to be called when feedback is successfully submitted via the prepared form.- Parameters:
onSubmitSuccess
- the callback to be called when feedback is successfully submitted via the prepared form
-
getOnSubmitError
Callback called when there is an error submitting feedback via the prepared form.- Returns:
- the callback to be called when there is an error submitting feedback via the prepared form
-
setOnSubmitError
public void setOnSubmitError(@Nullable @Nullable SentryFeedbackOptions.SentryFeedbackCallback onSubmitError) Sets the callback to be called when there is an error submitting feedback via the prepared form.- Parameters:
onSubmitError
- the callback to be called when there is an error submitting feedback via the prepared form
-
toString
-