Package io.sentry

Class SentryFeedbackOptions

java.lang.Object
io.sentry.SentryFeedbackOptions

@Internal public final class SentryFeedbackOptions extends Object
  • Constructor Details

  • 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

      @NotNull public @NotNull CharSequence getFormTitle()
      The title of the feedback form. Defaults to "Report a Bug".
      Returns:
      the title of the feedback form
    • setFormTitle

      public void setFormTitle(@NotNull @NotNull CharSequence formTitle)
      Sets the title of the feedback form.
      Parameters:
      formTitle - the title of the feedback form
    • getSubmitButtonLabel

      @NotNull public @NotNull CharSequence getSubmitButtonLabel()
      The label of the submit button. Defaults to "Send Bug Report".
      Returns:
      the label of the submit button
    • setSubmitButtonLabel

      public void setSubmitButtonLabel(@NotNull @NotNull CharSequence submitButtonLabel)
      Sets the label of the submit button. Defaults to "Send Bug Report".
      Parameters:
      submitButtonLabel - the label of the submit button
    • getCancelButtonLabel

      @NotNull public @NotNull CharSequence getCancelButtonLabel()
      The label of the cancel button. Defaults to "Cancel".
      Returns:
      the label of the cancel button
    • setCancelButtonLabel

      public void setCancelButtonLabel(@NotNull @NotNull CharSequence cancelButtonLabel)
      Sets the label of the cancel button.
      Parameters:
      cancelButtonLabel - the label of the cancel button
    • getNameLabel

      @NotNull public @NotNull CharSequence getNameLabel()
      The label next to the name input field. Defaults to "Name".
      Returns:
      the label next to the name input field
    • setNameLabel

      public void setNameLabel(@NotNull @NotNull CharSequence nameLabel)
      Sets the label next to the name input field.
      Parameters:
      nameLabel - the label next to the name input field
    • getNamePlaceholder

      @NotNull public @NotNull CharSequence getNamePlaceholder()
      The placeholder in the name input field. Defaults to "Your Name".
      Returns:
      the placeholder in the name input field
    • setNamePlaceholder

      public void setNamePlaceholder(@NotNull @NotNull CharSequence namePlaceholder)
      Sets the placeholder in the name input field.
      Parameters:
      namePlaceholder - the placeholder in the name input field
    • getEmailLabel

      @NotNull public @NotNull CharSequence getEmailLabel()
      The label next to the email input field. Defaults to "Email".
      Returns:
      the label next to the email input field
    • setEmailLabel

      public void setEmailLabel(@NotNull @NotNull CharSequence emailLabel)
      Sets the label next to the email input field.
      Parameters:
      emailLabel - the label next to the email input field
    • getEmailPlaceholder

      @NotNull public @NotNull CharSequence getEmailPlaceholder()
      The placeholder in the email input field. Defaults to "[email protected]".
      Returns:
      the placeholder in the email input field
    • setEmailPlaceholder

      public void setEmailPlaceholder(@NotNull @NotNull CharSequence emailPlaceholder)
      Sets the placeholder in the email input field.
      Parameters:
      emailPlaceholder - the placeholder in the email input field
    • getIsRequiredLabel

      @NotNull public @NotNull CharSequence 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

      public void setIsRequiredLabel(@NotNull @NotNull CharSequence isRequiredLabel)
      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

      @NotNull public @NotNull CharSequence getMessageLabel()
      The label of the feedback description input field. Defaults to "Description".
      Returns:
      the label of the feedback description input field
    • setMessageLabel

      public void setMessageLabel(@NotNull @NotNull CharSequence messageLabel)
      Sets the label of the feedback description input field.
      Parameters:
      messageLabel - the label of the feedback description input field
    • getMessagePlaceholder

      @NotNull public @NotNull CharSequence 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

      public void setMessagePlaceholder(@NotNull @NotNull CharSequence messagePlaceholder)
      Sets the placeholder in the feedback description input field.
      Parameters:
      messagePlaceholder - the placeholder in the feedback description input field
    • getSuccessMessageText

      @NotNull public @NotNull CharSequence 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

      public void setSuccessMessageText(@NotNull @NotNull CharSequence successMessageText)
      Sets the message displayed after a successful feedback submission.
      Parameters:
      successMessageText - the message displayed after a successful feedback submission
    • getOnFormOpen

      @Nullable public @Nullable Runnable getOnFormOpen()
      Callback called when the feedback form is opened.
      Returns:
      the callback to be called when the feedback form is opened
    • setOnFormOpen

      public void setOnFormOpen(@Nullable @Nullable Runnable onFormOpen)
      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

      @Nullable public @Nullable Runnable getOnFormClose()
      Callback called when the feedback form is closed.
      Returns:
      the callback to be called when the feedback form is closed
    • setOnFormClose

      public void setOnFormClose(@Nullable @Nullable Runnable onFormClose)
      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

      @Nullable public SentryFeedbackOptions.SentryFeedbackCallback 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

      @Nullable public @Nullable SentryFeedbackOptions.SentryFeedbackCallback 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

      public String toString()
      Overrides:
      toString in class Object