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).
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.
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:
- upload the feedback attachments on any remote services of your choice;
- then update the
Feedback
object to include the attachments URLs; - and call
super.onSendButtonClicked(Feedback)
to post the user feedback on Slack.
This is written in the excellent Kotlin programming language, and leverages some other excellent Open-Source libraries:
- Anko, by Kotlin
- khttp, by jkcclemens