Package com.zendesk.sdk.feedback
Class ZendeskFeedbackConnector
- java.lang.Object
-
- com.zendesk.sdk.feedback.ZendeskFeedbackConnector
-
- All Implemented Interfaces:
- FeedbackConnector, java.io.Serializable
public class ZendeskFeedbackConnector extends java.lang.Object implements FeedbackConnector
Connector to submit requests to a Zendesk instance.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static ZendeskFeedbackConnectordefaultConnector(Context context, ZendeskFeedbackConfiguration configuration, java.util.List<java.lang.String> additionalTags)Gets a default implementation of ZendeskFeedbackConnector.booleanisValid()Before calling #sendFeedback(String, java.util.List, ZendeskCallback) sendFeedback} the client code should verify that it is in a usable configuration.voidsendFeedback(java.lang.String feedback, java.util.List<java.lang.String> attachments, <any> callback)Sends feedback somewhere.
-
-
-
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 contextconfiguration- The feedback configuration to useadditionalTags- Any additional tags to add to the requestcustomFields- Any custom fields to add to the requestticketFormId- A ticket form IDrequestProvider- The request provider to useidentityStorage- 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 contextconfiguration- The feedback configuration to useadditionalTags- Any additional tags to add to the request- Returns:
- A default implementation of ZendeskFeedbackConnector
-
isValid
public boolean isValid()
Description copied from interface:FeedbackConnectorBefore 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
RateMyAppDialogto determine whether or not to show thefeedback button- Specified by:
isValidin interfaceFeedbackConnector- 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:FeedbackConnectorSends feedback somewhere.A concrete example of this can be seen in the
ZendeskFeedbackConnector- Specified by:
sendFeedbackin interfaceFeedbackConnector- Parameters:
feedback- The feedback to send, usually entered by a user of your appattachments- A list of attachment tokens (UploadResponse.getToken())callback- The callback which can be used to gets updates on the status of the feedback sending.
-
-