Feedback type
By default, your users have to categorize their feedback so you can filter and browse it more easily later on.
Introduction
Your users categorize every feedback as either a bug report, an improvement suggestion, or a question. Depending on what they choose, their feedback arrives with the Shake dashboard.
, or tag to yourCustom feedback types
You can configure Shake to display any number of custom feedback types related to your app.
Shake exposes an internal FeedbackType
type which is used to encapsulate the properties of your custom category.
Here's an example:
- Java
- Kotlin
List<FeedbackType> feedbackTypes = new ArrayList<>();feedbackTypes.add(new FeedbackType(R.drawable.ic_hardware, "Hardware issue", "hardware")); // Icon is optionalfeedbackTypes.add(new FeedbackType(R.drawable.ic_audio, "Call audio problem", "call_audio"));feedbackTypes.add(new FeedbackType(R.drawable.ic_files, "File sync issue", "file_sync"));Shake.getReportConfiguration().setFeedbackTypes(feedbackTypes);
val feedbackTypes = ArrayList<FeedbackType>()feedbackTypes.add(FeedbackType(R.drawable.ic_hardware, "Hardware issue", "hardware")) // Icon is optionalfeedbackTypes.add(FeedbackType(R.drawable.ic_audio, "Call audio problem", "call_audio"))feedbackTypes.add(FeedbackType(R.drawable.ic_files, "File sync issue", "file_sync"))Shake.getReportConfiguration().feedbackTypes = feedbackTypes
There is no limit to the number of categories you can enter.
Along with the setFeedbackTypes
method, Shake also exposes the getFeedbackTypes
method which allows you to
grab the current set of FeedbackType
and use them however you like.
As an example, certain parts of your app can have specific features, so you can have different feedback types for different parts of your app:
- Java
- Kotlin
public void enableVideoCallFeature(String contactID) {FeedbackType videoCallCategory = new FeedbackType(R.drawable.ic_hardware, "Hardware issue", "hardware");List<FeedbackType> existing = Shake.getReportConfiguration().getFeedbackTypes();existing.add(videoCallCategory);Shake.getReportConfiguration().setFeedbackTypes(existing);}
fun enableVideoCallFeature(contactID:String) {val videoCallCategory = FeedbackType(R.drawable.ic_hardware, "Hardware issue", "hardware")val existing = Shake.getReportConfiguration().feedbackTypesexisting.add(videoCallCategory)Shake.getReportConfiguration().feedbackTypes = existing}
Disable
If you don't want to force your users to categorize their feedback, simply hide this element:
- Java
- Kotlin
Shake.getReportConfiguration().setFeedbackTypeEnabled(false);
Shake.getReportConfiguration().isFeedbackTypeEnabled = false