android-issue-reporter


Source link: https://github.com/HeinrichReimer/android-issue-reporter

android-issue-reporter

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:

Screenshots

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.3.1' 
}

Get the latest dependency at jitpack.io.

How to use (with IssueReporterLauncher)

Just start the issue reporter directly from your activity using the launcher builder:

IssueReporterLauncher.forTarget("HeinrichReimer", "android-issue-reporter")

// [Recommended] Theme to use for the reporter. 

// (See #theming for further information.)

.theme(R.style.Theme_App_Dark)

// [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.

// (See #how-to-create-a-bot-key for further information.)

.guestToken("28f479f73db97d912611b27579aad7a76ad2baf5")

// [Optional] Force users to enter an email adress when the report is sent using

// the guest token.

.guestEmailRequired(true)

// [Optional] Set a minimum character limit for the description to filter out

// empty reports.

.minDescriptionLength(20)

// [Optional] Include other relevant info in the bug report (like custom variables)

.putExtraInfo("Test 1", "Example string")

.putExtraInfo("Test 2", true)

// [Optional] Disable back arrow in toolbar

.homeAsUpEnabled(false)

.launch(this);

How to use (extending IssueReporterActivity)

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");

  
}

 @Override
  protected void onCreate(Bundle savedInstanceState) {

// [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.

// (See #how-to-create-a-bot-key for further information.)

setGuestToken("28f479f73db97d912611b27579aad7a76ad2baf5")

// [Optional] Force users to enter an email adress when the report is sent using

// the guest token.

setGuestEmailRequired(true);

// [Optional] Set a minimum character limit for the description to filter out

// empty reports.

setMinimumDescriptionLength(20);

  
}

// [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);

  
}
 
}

Theming

Create a theme extending Theme.IssueReporter theme and set it to the launcher using IssueReporterLauncher.theme(@StyleRes int theme) or declare it in AndroidManifest.xml if you have extended IssueReporterActivity:

<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.

Resources

Animated placeholder in desert style.

Super simple RecyclerView adapter using Data Binding Technology.

An EditText which can remember last input, free developer from managing cache everywhere themselves.

Android LyricView that accepts lrc stream as input. A powerful lyric parser is also contained.

Logger is a logging tool helps unify release log and debug log, with some little advanced usage.

Android MVP is a way to separate Business logic from activities/views/fragments to make them independent of most lifecycle-related events. This way an application becomes simpler, overall application reliability increases up to 10 times, application code becomes shorter, code maintainability becomes better and developer's life becomes happier.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes