Class ZendeskFeedbackConnector

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static ZendeskFeedbackConnector defaultConnector(Context context, ZendeskFeedbackConfiguration configuration, java.util.List<java.lang.String> additionalTags)
      Gets a default implementation of ZendeskFeedbackConnector.
      boolean isValid()
      Before calling #sendFeedback(String, java.util.List, ZendeskCallback) sendFeedback} the client code should verify that it is in a usable configuration.
      void sendFeedback(java.lang.String feedback, java.util.List<java.lang.String> attachments, <any> callback)
      Sends feedback somewhere.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZendeskFeedbackConnector

        public ZendeskFeedbackConnector(Context context,
                                        ZendeskFeedbackConfiguration configuration,
                                        java.util.List<java.lang.String> additionalTags,
                                        java.util.List<CustomField> customFields,
                                        java.lang.Long ticketFormId,
                                        RequestProvider requestProvider,
                                        IdentityStorage identityStorage)
        Gets a default implementation of ZendeskFeedbackConnector. This version use some global state.
        Parameters:
        context - A valid context
        configuration - The feedback configuration to use
        additionalTags - Any additional tags to add to the request
        customFields - Any custom fields to add to the request
        ticketFormId - A ticket form ID
        requestProvider - The request provider to use
        identityStorage - The identity
    • Method Detail

      • defaultConnector

        public static ZendeskFeedbackConnector defaultConnector(Context context,
                                                                ZendeskFeedbackConfiguration configuration,
                                                                java.util.List<java.lang.String> additionalTags)
        Gets a default implementation of ZendeskFeedbackConnector. This version use some global state.
        Parameters:
        context - A valid context
        configuration - The feedback configuration to use
        additionalTags - Any additional tags to add to the request
        Returns:
        A default implementation of ZendeskFeedbackConnector
      • isValid

        public boolean isValid()
        Description copied from interface: FeedbackConnector
        Before calling #sendFeedback(String, java.util.List, ZendeskCallback) sendFeedback} the client code should verify that it is in a usable configuration. Connectors should return true only if they are certain of being successfully able to send feedback.

        This method can also be used by the RateMyAppDialog to determine whether or not to show the feedback button

        Specified by:
        isValid in interface FeedbackConnector
        Returns:
        true if the connector has valid data
      • sendFeedback

        public void sendFeedback(java.lang.String feedback,
                                 java.util.List<java.lang.String> attachments,
                                 <any> callback)
        Description copied from interface: FeedbackConnector
        Sends feedback somewhere.

        A concrete example of this can be seen in the ZendeskFeedbackConnector

        Specified by:
        sendFeedback in interface FeedbackConnector
        Parameters:
        feedback - The feedback to send, usually entered by a user of your app
        attachments - A list of attachment tokens (UploadResponse.getToken())
        callback - The callback which can be used to gets updates on the status of the feedback sending.