diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index dca5de4..c9c953b 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -48,12 +48,13 @@ You'll have to:
- Configure fabric and add your `apiKey` and `apiSecret` in the `fabric.properties` file.
- Create a firebase project and add the `google-services.json` to the `app/` folder.
-- Define the following some parameters either in `~/.gradle/gradle.properties` or as gradle parameters (see the examples)
+- Define some parameters either in `~/.gradle/gradle.properties` or as gradle parameters (see the examples)
- mercuryApiKey: A [Mercury](https://mercury.postlight.com/web-parser/) web parser api key for the internal browser
- feedbackEmail: An email to receive users feedback.
- sourceUrl: an url to the source code, used in the settings. **It can be empty.**
- trackerUrl: an url to the tracker, used in the settings. **It can be empty.**
+ - githubToken: a github token used to report issues from within the app. [Details here](https://github.com/heinrichreimer/android-issue-reporter#how-to-create-a-bot-key). **It can be empty.**
- appLoginUrl, appLoginUsername and appLoginPassword: url, username and password of a selfoss instance. **These are only used for tests. They can be empty if you don't test API calls.**
### Examples:
@@ -67,10 +68,11 @@ mercuryApiKey="LONGAPIKEY"
feedbackEmail="EMAIL"
sourceUrl="URLSOURCE" # It can be empty.
trackerUrl="URLTRACKER" # It can be empty.
+githubToken="GITHUBTOKEN" # It can be empty or use https://github.com/heinrichreimer/android-issue-reporter#how-to-create-a-bot-key to generate one
```
#### As gradle parameters
```
-./gradlew .... -P appLoginUrl="URL" -P appLoginUsername="LOGIN" -P appLoginPassword="PASS" -P mercuryApiKey="LONGAPIKEY" -P feedbackEmail="EMAIL" -P sourceUrl="URLSOURCE" -P trackerUrl="URLTRACKER"
+./gradlew .... -P appLoginUrl="URL" -P appLoginUsername="LOGIN" -P appLoginPassword="PASS" -P mercuryApiKey="LONGAPIKEY" -P feedbackEmail="EMAIL" -P sourceUrl="URLSOURCE" -P trackerUrl="URLTRACKER" -P githubToken="GITHUBTOKEN"
```
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c62b0de..c4e0125 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+**1.5.4.00**
+
+- Added issue reporting from within the app.
+
**1.5.3.06**
- Fixed infinite scroll not working.
diff --git a/app/build.gradle b/app/build.gradle
index eae3938..7b6c2b4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -63,6 +63,7 @@ android {
buildConfigField "String", "SOURCE_URL", sourceUrl
buildConfigField "String", "TRACKER_URL", trackerUrl
buildConfigField "String", "TRANSLATION_URL", translationUrl
+ buildConfigField "String", "GITHUB_TOKEN", githubToken
}
buildTypes {
release {
@@ -106,13 +107,13 @@ dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
// Android Support
- compile 'com.android.support:appcompat-v7:26.0.1'
- compile 'com.android.support:design:26.0.1'
- compile 'com.android.support:recyclerview-v7:26.0.1'
- compile 'com.android.support:support-v4:26.0.1'
- compile 'com.android.support:support-vector-drawable:26.0.1'
- compile 'com.android.support:customtabs:26.0.1'
- compile 'com.android.support:cardview-v7:26.0.1'
+ compile 'com.android.support:appcompat-v7:26.0.2'
+ compile 'com.android.support:design:26.0.2'
+ compile 'com.android.support:recyclerview-v7:26.0.2'
+ compile 'com.android.support:support-v4:26.0.2'
+ compile 'com.android.support:support-vector-drawable:26.0.2'
+ compile 'com.android.support:customtabs:26.0.2'
+ compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
// Firebase + crashlytics
@@ -166,6 +167,8 @@ dependencies {
// Themes
compile 'com.52inc:scoops:1.0.0'
+ // Github issues reporter
+ compile 'com.heinrichreimersoftware:android-issue-reporter:1.3.1'
}
apply plugin: 'com.google.gms.google-services'
@@ -210,6 +213,7 @@ def initAppForSecretPropertiesIfNeeded() {
entry(key: "sourceUrl", value: System.getProperty("sourceUrl"))
entry(key: "trackerUrl", value: System.getProperty("trackerUrl"))
entry(key: "translationUrl", value: System.getProperty("translationUrl"))
+ entry(key: "githubToken", value: System.getProperty("githubToken"))
}
}
}
diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt
index a158a7a..8fa95fa 100644
--- a/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt
+++ b/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt
@@ -64,6 +64,7 @@ import com.ashokvarma.bottomnavigation.BottomNavigationBar
import com.ashokvarma.bottomnavigation.BottomNavigationItem
import com.ashokvarma.bottomnavigation.TextBadgeItem
import com.ftinc.scoop.Scoop
+import com.heinrichreimersoftware.androidissuereporter.IssueReporterLauncher
import com.mikepenz.materialdrawer.AccountHeader
import com.mikepenz.materialdrawer.AccountHeaderBuilder
import com.mikepenz.materialdrawer.model.ProfileDrawerItem
@@ -352,6 +353,25 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
drawer = drawerBuilder.build()
+ drawer.addStickyFooterItem(
+ PrimaryDrawerItem()
+ .withName(R.string.drawer_report_bug)
+ .withIcon(R.drawable.ic_bug_report)
+ .withIconTintingEnabled(true)
+ .withOnDrawerItemClickListener { _, _, _ ->
+ IssueReporterLauncher.forTarget(getString(R.string.report_github_user), getString(R.string.report_github_repo))
+ .theme(R.style.Theme_App_Light)
+ .guestToken(BuildConfig.GITHUB_TOKEN)
+ .guestEmailRequired(true)
+ .minDescriptionLength(20)
+ .putExtraInfo("Unique ID", settings.getString("unique_id", ""))
+ .putExtraInfo("From github", BuildConfig.GITHUB_VERSION)
+ .homeAsUpEnabled(true)
+ .launch(this)
+ false
+ }
+ )
+
drawer.addStickyFooterItem(
PrimaryDrawerItem()
.withName(R.string.title_activity_settings)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f0a3f93..72eb5ea 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -156,4 +156,7 @@
(BETA) Load more articles on scroll
Translation
The item url is invalid. I\'m looking into solving this issue so the app won\'t crash.
+ aminecmi
+ ReaderforSelfoss
+ Report a bug
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index b9c1081..e1d56cf 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -191,4 +191,11 @@
- @color/md_grey_900
+
+