Class RateMyAppDialog.Builder

  • Enclosing class:
    RateMyAppDialog


    public static class RateMyAppDialog.Builder
    extends java.lang.Object
    Builder class used to instantiate a RateMyAppDialog

    Buttons should be added in the order that you want them to display.

    • Constructor Detail

      • Builder

        public Builder(FragmentActivity activity)
    • Method Detail

      • withButton

        public RateMyAppDialog.Builder withButton(RateMyAppButton button)
        Adds a button which conforms to the RateMyAppButton interface

        Note that if the button or the activity supplied in the builder is null then no button will be added.

        Parameters:
        button - The button to add
        Returns:
        the builder
      • withAndroidStoreRatingButton

        public RateMyAppDialog.Builder withAndroidStoreRatingButton()
        Adds a button which will link to an android store when tapped.

        Note that if the activity supplied in the builder is null then no button will be added. It will also not be added if the server settings did not supply a store URL.

        As the android store url will be supplied by the server this could link to Google Play, Amazon etc.

        Returns:
        the builder
      • withDontRemindMeAgainButton

        public RateMyAppDialog.Builder withDontRemindMeAgainButton()
        Adds a button which will dismiss the dialog and never show it again.

        Note that if the activity supplied in the builder is null then no button will be added.

        Returns:
        the builder
      • withSendFeedbackButton

        public RateMyAppDialog.Builder withSendFeedbackButton()
        Adds a button which will open a UI where the user can enter feedback.
        Returns:
        the builder
      • withSendFeedbackButton

        public RateMyAppDialog.Builder withSendFeedbackButton(ZendeskFeedbackConfiguration feedbackConfiguration)
        Adds a button which will open a UI where the user can enter feedback.

        This overload allows additional configuration to be supplied, which will enhance the feedback.

        Parameters:
        feedbackConfiguration - instance of ZendeskFeedbackConfiguration used to control the content of the feedback that is sent to Zendesk
        Returns:
        the builder
      • withSendFeedbackButton

        public RateMyAppDialog.Builder withSendFeedbackButton(ZendeskFeedbackConfiguration feedbackConfiguration,
                                                              SubmissionListener listener)
        Adds a button which will open a UI where the user can enter feedback.

        This method also allows you to specify a callback to tell when the user has cancelled the feedback dialog and to know when the feedback has been sent.

        Note that the button will not be added if the FeedbackConnector is null or in an invalid state.

        Parameters:
        feedbackConfiguration - instance of ZendeskFeedbackConfiguration used to control the content of the feedback that is sent to Zendesk
        listener - The listener that will be called when the user cancels the dialog or sends feedback. Can also be used to determine other submission lifecycle events
        Returns:
        the builder
      • withRules

        public RateMyAppDialog.Builder withRules(RateMyAppRule... rules)
        Specifies one or more rules which will govern when the RateMyAppDialog is permitted to show.

        A default set of rules will be applied if you don't specify any rules here

        Parameters:
        rules - one or more RateMyAppRules
        Returns:
        the builder