GithubHelp home page GithubHelp logo

morristech / android-issue-reporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heinrichreimer/android-issue-reporter

0.0 1.0 0.0 1.99 MB

A powerful and simple library to open issues on GitHub directly from your app.

License: Apache License 2.0

Java 100.00%

android-issue-reporter's Introduction

Icon

android-issue-reporter

Android Arsenal JitPack Build Status Apache License 2.0

Based on Paolo Rotolo's Gitty Reporter

Is your Inbox full of bug reports and requests from your users?

android-issue-reporter is a new material designed library to report issues from your app directly to GitHub, even without an account.

Demo

A demo app is available on Google Play:

Get it on Google Play

Screenshots

material-drawer material-drawer material-drawer
GitHub bot Include device info Demo

Dependency

android-issue-reporter is available on jitpack.io

Gradle dependency:

repositories {
    maven { url 'https://jitpack.io' }
}
dependencies {
    compile 'com.heinrichreimersoftware:android-issue-reporter:1.2.5'
}

Get the latest dependency at jitpack.io.

How to use

Just create a new Activity that extends IssueReporterActivity:

public class ExampleReporterActivity extends IssueReporterActivity {
    // Where should the issues go?
    // (http://github.com/username/repository)
    @Override
    public GithubTarget getTarget() {
        return new GithubTarget("username", "repository");
    }

    // [Optional] Auth token to open issues if users don't have a GitHub account
    // You can register a bot account on GitHub and copy ist OAuth2 token here. 
    @Override
    public String getGuestToken() {
        return "28f479f73db97d912611b27579aad7a76ad2baf5";
    }

    // [Optional] Include other relevant info in the bug report (like custom variables)
    @Override
    public void onSaveExtraInfo(ExtraInfo extraInfo) {
        extraInfo.put("Test 1", "Example string");
        extraInfo.put("Test 2", true);
    }
}

Your activity must have an Theme.IssueReporter theme declared in AndroidManifest.xml:

<style name="Theme.App.Light" parent="Theme.IssueReporter">
    <item name="colorPrimary">...</item><!-- required -->
    <item name="colorPrimaryDark">...</item><!-- required -->
    <item name="colorAccent">...</item><!-- required -->
</style>

You can use Theme.IssueReporter.Light or Theme.IssueReporter.Light.DarkActionBar as replacement if you want a light theme.

How to create a bot key

  1. Create a new GitHub account.
    (You have to use a unique email address.)

  2. Go to https://github.com/settings/tokens and create a new token using Generate new token.
    (You only need to give the bot the public_repo permission.)

  3. Copy the OAuth access token you get at the end of the setup.

  4. Override getGuestToken() in your reporter activity like this:

    @Override
    public String getGuestToken() {
        return "<your token here>";
    }

Limitations

  • You can't use two factor authentication.

android-issue-reporter's People

Contributors

heinrichreimer avatar iambriccardo avatar kabouzeid avatar paolorotolo avatar patrick91 avatar pinpong avatar rosenpin avatar rotolonico avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.