Skip to content

Latest commit

 

History

History
69 lines (53 loc) · 2.95 KB

README.md

File metadata and controls

69 lines (53 loc) · 2.95 KB

Bintray

Table of Contents generated with DocToc

maoni-slack aims at sending the valuable feedback of your app users to the specified Slack channel (using a Slack WebHook URL you will pass).

Getting started

First set up an incoming WebHook integration in Slack and copy the Webhook URL.

Now in your app, add this to your build.gradle:

  dependencies {
    implementation('org.rm3l:maoni:10.0.0@aar') {
        transitive = true
        //Needed because of https://github.com/rm3l/maoni/issues/294
        exclude module: 'unspecified'
    }
    implementation('org.rm3l:maoni-slack:10.0.0@aar') {
        transitive = true
        //Needed because of https://github.com/rm3l/maoni/issues/294
        exclude module: 'unspecified'
    }
  }

And set it as the listener for your Maoni instance:

    //Customize the maoni-slack listener, with things like your WebHook URL, ...
    final org.rm3l.maoni.slack.MaoniSlackListener listenerForMaoni = 
            new org.rm3l.maoni.slack.MaoniSlackListener(...);
    
    new Maoni.Builder(MY_FILE_PROVIDER_AUTHORITY)
        .withListener(listenerForMaoni) //Callback from maoni-slack
        //...
        .build()
        .start(MaoniSampleMainActivity.this); //The screenshot captured is relative to this calling context 

You're good to go! Maoni will take care of validating / collecting your users' feedbacks and call maoni-slack as needed.

Caveats

At this time, Slack Incoming Webhook integration does not provide any ways to upload images or files. Application logs are however read to a text and included as wehbook message attachment. However, the capability to attach screen captures to user feedback is not supported by maoni-slack. Please note however that you can always provide your own callback implementation by extending MaoniSlackListener class and overriding its onSendButtonClicked(Feedback) method, so as to:

  1. upload the feedback attachments on any remote services of your choice;
  2. then update the Feedback object to include the attachments URLs;
  3. and call super.onSendButtonClicked(Feedback) to post the user feedback on Slack.

Credits

This is written in the excellent Kotlin programming language, and leverages some other excellent Open-Source libraries: