I'm trying to implement the issue reporter screen in my app.
Here's my code:
public class ReporterActivity extends IssueReporterActivity {
//Where should the issues go?
//(http://github.com/username/repository)
@Override
public GithubTarget getTarget() {
return new GithubTarget("rosenpin", "AlwaysOnDisplayAmoled");
}
//[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 "MY_CODE";
}
//[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);
}
}
But after I call the startActivity I get this exception in the ReporterActivity class
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.tomer.alwayson"
minSdkVersion 19
targetSdkVersion 24
versionCode 107
versionName "0.87 B"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
abortOnError false
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'com.heinrichreimersoftware:android-issue-reporter:1.2.5'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'eu.chainfire:libsuperuser:1.0.0.201602271131'
compile 'com.github.paolorotolo:appintro:4.0.0'
compile('de.psdev.licensesdialog:licensesdialog:1.8.1')
compile 'com.afollestad.material-dialogs:commons:0.8.6.0'
compile project(':lib')
testCompile 'junit:junit:4.12'
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}