All Projects → rm3l → Maoni

rm3l / Maoni

Licence: mit
Lightweight library for collecting and handling user feedback from within Android applications.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Maoni

Materialfiles
Material Design file manager for Android
Stars: ✭ 1,092 (+669.01%)
Mutual labels:  material-design, android-application
Yourweather
🌞 你的天气:OkHttp +Material Design+《第一行代码》
Stars: ✭ 100 (-29.58%)
Mutual labels:  material-design, android-application
Douyaapikey
豆芽 API Key 设置向导
Stars: ✭ 65 (-54.23%)
Mutual labels:  material-design, android-application
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (-3.52%)
Mutual labels:  material-design, android-application
Todayx
🌈Flutter App:🎊「今日份的X」(每天推荐一个:图片、诗歌、名言、音乐、乐评、高等数学、两种配色、化学方程式、Github Repo、知乎问题、文章)
Stars: ✭ 128 (-9.86%)
Mutual labels:  material-design, android-application
Music Player Go
🎶🎼 Very slim music player 👨‍🎤 100% made in Italy 🍕🌳🌞🍝🌄
Stars: ✭ 654 (+360.56%)
Mutual labels:  material-design, android-application
Datingapp
Dating UI kit is used for online meet up with girls and boys . The screen contains more than 30 icons and most of all required elements required to design an application like this. The XML and JAVA files contains comments at each and every point for easy understanding. Everything was made with a detail oriented style and followed by today's web trends. Clean coded & Layers are well-organized, carefully named, and grouped.
Stars: ✭ 97 (-31.69%)
Mutual labels:  material-design, android-application
Ecommerce App Android
E-Commerce App for Android with Material Design Pattern
Stars: ✭ 470 (+230.99%)
Mutual labels:  material-design, android-application
Sdkmonitor
App to display and monitor the targetSDK from installed apps.
Stars: ✭ 122 (-14.08%)
Mutual labels:  material-design, android-application
Keepassdx
📱 KeePass implementation for android with material design and deluxe features
Stars: ✭ 1,395 (+882.39%)
Mutual labels:  material-design, android-application
Changedetection
Automatically track websites changes on Android in background.
Stars: ✭ 563 (+296.48%)
Mutual labels:  material-design, android-application
Everythingdone
EverythingDone, an Android app to help you remember things, and finish them!
Stars: ✭ 134 (-5.63%)
Mutual labels:  material-design, android-application
Quill
👻 [MOVED TO https://github.com/TryGhost/Ghost-Android] The beautiful Android app for your Ghost blog.
Stars: ✭ 552 (+288.73%)
Mutual labels:  material-design, android-application
Morphing Material Dialogs
Material dialog ❤️ morphing animation. An android kotlin UI library for building beautiful animations for converting a floating action button into a material dialog.
Stars: ✭ 806 (+467.61%)
Mutual labels:  material-design, android-application
Douya
开源的 Material Design 豆瓣客户端(A Material Design app for douban.com)
Stars: ✭ 4,502 (+3070.42%)
Mutual labels:  material-design, android-application
Iconshowcase
Full-of-features, easy-to-customize, free and open source, Material Design dashboard for icon packs.
Stars: ✭ 91 (-35.92%)
Mutual labels:  material-design, android-application
Blueprint
Free, feature-rich, easily customizable Android dashboard for icon packs
Stars: ✭ 389 (+173.94%)
Mutual labels:  material-design, android-application
Frames
Free, feature-rich, easily customizable Android dashboard for wallpapers apps
Stars: ✭ 396 (+178.87%)
Mutual labels:  material-design, android-application
Mediapicker
Easy customizable picker for all your needs in Android application
Stars: ✭ 105 (-26.06%)
Mutual labels:  material-design, android-application
Shotang App
The New Home Screen is designed in a modular way with the core focus on product discovery. Search, Deals, Products everything has been brought upfront. The hamburger menu has been replaced with a bottom navigation bar for easy reachability. On the tech side too, this design allows us to run new deals and other experiments in an agile manner which wasn't possible in the previous version.
Stars: ✭ 132 (-7.04%)
Mutual labels:  material-design, android-application

Maven Central License

Android Arsenal Website

CI Translations Website

Maintainability Issue Count

GitHub watchers GitHub stars GitHub forks

Table of Contents generated with DocToc

Maoni is a lightweight open-source library for integrating a way to collect user feedback from within Android applications.

Built from the ground up with the Material Design principles in mind, it allows to capture a screenshot of the activity the user is currently viewing and attach it to the feedback.

Just provide callbacks implementations and you're good to go. Maoni will take care of collecting feedback and call those implementations.

Below is a quick overview of the features included:

  • Contextual information. Device and application information, if available.
    • Device screen resolution, mobile data and GPS states, ...
  • Screenshot and logs capture.
    • Because receiving a feedback with contextual information is much much better for analysis, Maoni allows to take a screen capture of the calling activity, along with the application logs. Note that the inclusion of such screenshot and logs in the feedback object is opt-out, at the user's discretion.
    • Touch to preview screenshot
    • Ability for users of your app to highlight or blackout items in the screen capture. They may choose to highlight relevant items or blackout any sensitive information.
  • Customization.
    • Besides the default form fields, you are free to include an extra layout with additional views. And you always have access to the underlying view elements.
    • Theme elements and styles can be adjusted.
  • Callbacks.
    • Form validation. You can provide your own if needed for example for your extra fields.
    • Listeners. Upon validation, Maoni calls the callbacks implementations you provided earlier. So you just have limitless possibilities for an integration with any remote feedback services. For reference, the following implementations are provided as external dependencies:
      • maoni-email, so your users can send their feedback via email
      • maoni-slack, so your users can send their feedback to Slack
      • maoni-jira, to send user feedback as JIRA issues (to the JIRA host of your choice)
      • maoni-github, to send user feedback as Github issues (to the Github repository of your choice)
      • maoni-doorbell, to send user feedback to Doorbell.io

Take a look at the sample application for a quick overview.

Motivations

While working on a new version of DD-WRT Companion, one of my Android apps, I needed a simple yet pleasant way to collect user feedback, along with some contextual information. I experimented with a simple dialog, then tried a bunch of other libraries, but could not find one with screenshot capturing capabilities, not vendor lock-in, and which is almost a no-brainer as to integrating with any remote services. I was also looking for screen capture highlight / blackout capabilities, as in use for issue reporting in several apps from Google.

So as a way to give back to the Open Source community, I decided to create Maoni as a separate library project.

By the way, as a side note, Maoni is a Swahili word for comments or opinions.

Sample App

Get it on Google Play

Preview

Getting started

This library is published on Maven Central. So importing it should be straightforward. Declare the Maven Central repository (if not done yet) and import this project:

  repositories {
      //...
      mavenCentral()
  }

  dependencies {
    // ...
    implementation 'org.rm3l:maoni:[email protected]'
  }

Putting it together

Integrating with Maoni is intended to be seamless and straightforward for most existing Android applications.

Just leverage the fluent Maoni Builder to construct and start an Maoni instance at the right place within your application workflow (for example a button click listener, or a touch of a menu item).

For example, to start with just the defaults:

    //The optional file provider authority allows you to 
    //share the screenshot capture file to other apps (depending on your callback implementation)
    new Maoni.Builder(<myContextObject>, MY_FILE_PROVIDER_AUTHORITY)
        .withDefaultToEmailAddress("[email protected]")
        .build()
        .start(MaoniSampleMainActivity.this); //The screenshot captured is relative to this calling activity 

To customize every aspect of your Maoni activity, call the fluent methods of Maoni.Builder, e.g.:

    // MyHandlerForMaoni is a custom implementation of Maoni.Handler, 
    // which is a shortcut interface for defining both a validator and listeners for Maoni
    final MyHandlerForMaoni myHandlerForMaoni = new MyHandlerForMaoni(MaoniSampleMainActivity.this);
    
    //The optional file provider authority allows you to 
    //share the screenshot capture file to other apps (depending on your callback implementation)
    new Maoni.Builder(MY_FILE_PROVIDER_AUTHORITY)
        .withWindowTitle("Send Feedback") //Set to an empty string to clear it
        .withMessage("Hey! Love this app? We would love to hear from you.")
        .withExtraLayout(R.layout.my_feedback_activity_extra_content)
        .withHandler(myHandlerForMaoni) //Custom Callback for Maoni
        .withFeedbackContentHint("[Custom hint] Write your feedback here")
        .withIncludeScreenshotText("[Custom text] Include screenshot")
        .withTouchToPreviewScreenshotText("Touch To Preview and Edit")
        .withContentErrorMessage("Custom error message")
        .withScreenshotHint("Custom test: Lorem Ipsum Dolor Sit Amet...")
        //... there are other aspects you can customize
        .build()
        .start(MaoniSampleMainActivity.this); //The screenshot captured is relative to this calling activity 

You're good to go! Maoni will take care of validating / collecting user feedback and call your callbacks implementations.

Available callbacks

Some common callbacks for Maoni are available as external dependencies to include in your application.

maoni-email

This callback opens up an Intent for sending an email with the feedback collected. This is the default fallback listener used in case no other listener has been set explicitly. In other words, you need not import maoni-email as an extra dependency. Just import maoni as depicted above, and you're good to go.

Add this additional line to your build.gradle:

  dependencies {
    // ...
    implementation 'org.rm3l:maoni:[email protected]'
  }

And set it as the listener for your Maoni instance:

    final org.rm3l.maoni.email.MaoniEmailListener emailListenerForMaoni = 
            new org.rm3l.maoni.email.MaoniEmailListener(...);
    
    new Maoni.Builder(MY_FILE_PROVIDER_AUTHORITY)
        .withListener(emailListenerForMaoni) //Callback from maoni-email
        //...
        .build()
        .start(MaoniSampleMainActivity.this); //The screenshot captured is relative to this calling activity 

Visit the dedicated README for further details.

maoni-slack

This callback sends feedback collected to Slack via an an incoming WebHook integration.

To use it, you must first set up an incoming WebHook integration, and grab the Webhook URL.

Add this additional line to your build.gradle:

  dependencies {
    // ...
    implementation 'org.rm3l:maoni:[email protected]'
    implementation 'org.rm3l:maoni-slack:[email protected]'
  }

And set it as the listener for your Maoni instance

    final org.rm3l.maoni.slack.MaoniSlackListener slackListenerForMaoni = 
            new org.rm3l.maoni.slack.MaoniSlackListener(...); //Pass the Slack WebHook URL, channel, ...
    
    new Maoni.Builder(MY_FILE_PROVIDER_AUTHORITY)
        .withListener(slackListenerForMaoni) //Callback from maoni-slack
        //...
        .build()
        .start(MaoniSampleMainActivity.this); //The screenshot captured is relative to this calling activity 

Visit the dedicated README for further details.

maoni-github

This callback sends feedback collected as a Github issue to a specified Github repository.

To use it, you will need to have an account there, and grab your Personal Access Token. You may want to create a dedicated reporter user for that purpose.

Add this additional line to your build.gradle:

  dependencies {
    implementation 'org.rm3l:maoni:[email protected]'
    implementation 'org.rm3l:maoni-github:[email protected]'
  }

And set it as the listener for your Maoni instance:

    //Customize the maoni-github listener, with things like your user personal Access Token on Github
    final org.rm3l.maoni.github.MaoniGithubListener listenerForMaoni = 
            new org.rm3l.maoni.github.MaoniGithubListener(...);
    
    new Maoni.Builder(MY_FILE_PROVIDER_AUTHORITY)
        .withListener(listenerForMaoni) //Callback from maoni-github
        //...
        .build()
        .start(MaoniSampleMainActivity.this); //The screenshot captured is relative to this calling context 

Visit the dedicated README for further details.

maoni-jira

This callback sends feedback collected as a JIRA issue to a specified JIRA project.

You may want to create a dedicated reporter user on your JIRA Host for that purpose.

Add this additional line to your build.gradle:

  dependencies {
    implementation 'org.rm3l:maoni:[email protected]'
    implementation 'org.rm3l:maoni-jira:[email protected]'
  }

And set it as the listener for your Maoni instance:

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

Visit the dedicated README for further details.

maoni-doorbell

This callback sends feedback collected to Doorbell.

To use it, you will need to have an account there, and grab your application ID and secret key.

Add this additional line to your build.gradle:

  dependencies {
    // ...
    implementation 'org.rm3l:maoni:[email protected]'
    implementation 'org.rm3l:maoni-doorbell:[email protected]'
  }

And set it as the listener for your Maoni instance:

    final org.rm3l.maoni.doorbell.MaoniDoorbellListener doorbellListenerForMaoni = 
            new org.rm3l.maoni.doorbell.MaoniDoorbellListener(...);
    
    new Maoni.Builder(MY_FILE_PROVIDER_AUTHORITY)
        .withListener(doorbellListenerForMaoni) //Callback from maoni-doorbell
        //...
        .build()
        .start(MaoniSampleMainActivity.this); //The screenshot captured is relative to this calling activity 

Visit the dedicated README for further details.

Sharing the files captured with other apps

The file provider authority specified in the Maoni.Builder constructor allows you to share the screenshot capture and logs files to other apps (depending on your callback implementation). By default, Maoni stores the files captured in your application cache directory, but this is (again) entirely customizable.

You must declare a file content provider in your AndroidManifest.xml file with an explicit list of sharable directories for other apps to be able to read the screenshot file. For example:

  • If you use AndroidX:
<application>
    <!-- ... -->
    <!-- If not defined yet, declare a file provider to be able to share screenshots captured by Maoni -->
    <provider
        android:name="androidx.core.content.FileProvider"
        android:authorities="com.mydomain.fileprovider"
        android:grantUriPermissions="true"
        android:exported="false">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/filepaths" />
    </provider>
</application>
  • Otherwise:
<application>
    <!-- ... -->
    <!-- If not defined yet, declare a file provider to be able to share screenshots captured by Maoni -->
    <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="com.mydomain.fileprovider"
        android:grantUriPermissions="true"
        android:exported="false">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/filepaths" />
    </provider>
</application>

Along with the XML file that specifies the sharable directories (under res/xml/filepaths.xml as specified above):

<paths>
    <!-- By default, Maoni stores files captured (screenshots and logs) in the application cache directory. 
    So you must declare the path '.' as shareable. Specify something else if you are using a different path -->
    <cache-path name="maoni-shares" path="." />
    <!-- <files-path path="maoni-working-dir/" name="myCustomWorkingDirForMaoni" /> -->
</paths>

See https://goo.gl/31nStZ for further instructions on how to setup file sharing.

Contribute and Improve Maoni!

Contributions and issue reporting are more than welcome. So to help out, do feel free to fork this repo and open up a pull request. I'll review and merge your changes as quickly as possible.

You can use GitHub issues to report bugs. However, please make sure your description is clear enough and has sufficient instructions to be able to reproduce the issue.

You can also use the sample app to send your feedback with Maoni. ;-)

Building from source

Make sure you have the Android SDK installed.

Also make sure you have the appropriate Build Tools installed. You can install them via the Android's sdkmanager:

sdkmanager "build-tools;28.0.3"

Now you can build the project with the Gradle Wrapper:

./gradlew lintDebug testDebug assembleDebug

You will then find the artifacts under the following folders:

  • maoni/build/outputs/aar/
  • maoni-common/build/libs/
  • maoni-sample/build/outputs/apk/

Translations

I use Crowdin as the translation system. All related resources for localization are automatically generated from files got with Crowdin.

To help out with any translation, please head to Crowdin and request to join the translation team. If your language is not listed there, just drop me an e-mail at <[email protected]>.

Please do not submit GitHub pull requests with translation fixes as any changes will be overwritten with the next update from Crowdin.

Contributing callbacks for Maoni

You can create separate Android Library Projects that implement any of the Maoni callbacks interfaces (Validator, Listener, UiListener, Handler or any combination), so users can use them in their projects.

You just have to include maoni-common as a dependency in your project, e.g., with Gradle:

  dependencies {
    // ...
    api 'org.rm3l:maoni-common:[email protected]'
  }

You can write your project in any JVM language of your choice (e.g., Kotlin, as with maoni-slack and maoni-github), as long as the callback implementation can be called from Maoni.

Publishing a new release

All releases (Git tags) are published to Maven Central via Sonatype.

The .github/workflows/build.yml Workflow file contains a Job responsible for publishing libraries to Sonatype whenever a new tag is pushed.

Alternatively, this operation may be performed manually. To do so, you can update or create a local.properties file (local only, not under version control) file at the root of this project. This file should contain at least the following properties:

  • signing.keyId : the GPG Signing Key ID
  • signing.secretKeyRingFile : the path to the GPG signing key file, to use for signing files uploaded to Maven Central
  • signing.password : the GPG signing key password
  • ossrhUsername : the Sonatype Nexus Repository username
  • ossrhPassword : the Sonatype Nexus Repository user password
  • sonatypeStagingProfileId: the Staging Repo Profile ID (ask one maintainer to provide such information)

The following command can then be run to publish a new version:

./gradlew javadoc publishToSonatype closeAndReleaseStagingRepository

In use in the following apps

(If you use Maoni, please drop me a line at <[email protected]> (or again, fork, modify this file and submit a pull request), so I can list your app(s) here)

Credits

Developed by

Contributors

Thanks to the following people who help(ed) improve Maoni, either by suggesting translations or by reporting an issue and/or submitting pull requests.

In no particular order:

License

The MIT License (MIT)

Copyright (c) 2016-2021 Armel Soro

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].