Skip to content
forked from rm3l/maoni

An opinionated, batteries-included feedback library aimed at replicating the Google feedback mechanism circa early 2017.

License

Notifications You must be signed in to change notification settings

MariusVolkhart/feedback

 
 

Repository files navigation

Feedback

Feedback is an Android library that aims to replicate the Google feedback mechanism circa start of 2017. Feedback tries to be opinionated about the UI and attempts to provide a great UX on all form factors.

Feedback captures a screenshot which the user can markup, as well as the system logs, and provides them for easy upload.

Using in your application

The Basics

Maven Central

Add the dependency to your build.gradle:

  compile ('com.volkhart.feedback:feedback:<current_version>')

Add the following to your AndroidManifest.xml. This is used to safely share the screenshot.

<provider
    android:name="com.volkhart.feedback.FeedbackFileProvider"
    android:authorities="${applicationId}.feedback"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/feedback_filepaths" />
</provider>

Subclass FeedbackFragment...

public class MyFeedbackFragment extends com.volkhart.feedback.FeedbackFragment {
    public static final String TAG = "MyFeedbackFragment";
    
    @Override
    protected Configuration getConfiguration() {
        String authority = BuildConfig.APPLICATION_ID + ".feedback";
        return new Configuration(authority);
    }

    @Override
    public boolean onSendButtonClicked(Feedback feedback) {
        return false; // TODO implement
    }
}

... and add it to your Activity.

public class MyActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .add(new MyFeedbackFragment(), MyFeedbackFragment.TAG)
                    .commit();
        }
        // Other stuff...
    }
}

Uploading

You'll want to call your upload mechanism in onSendButtonClicked(Feedback) of your FeedbackFragment subclass. There are several components available that implement uploading to popular destinations; they are listed here (search the page for maoni- ). Alternatively you can handle the uploading yourself.

Alternatives

If you're looking for more customizability, check out the parent project, maoni.

About

An opinionated, batteries-included feedback library aimed at replicating the Google feedback mechanism circa early 2017.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 97.5%
  • Shell 2.5%