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.
A demo app is available on Google Play:
GitHub bot | Include device info | Demo |
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.
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);
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);
}
}
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.
Create a new GitHub account.
(You have to use a unique email address.)
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.)
Copy the OAuth access token you get at the end of the setup.
Override getGuestToken()
in your reporter activity like this:
@Override
public String getGuestToken() {
return "<your token here>";
}
当我在Android Studio中按下运行按钮时,我的应用程序会编译但显示此错误(已编辑): Error:Program type already present: android.arch.lifecycle.LiveData (完整日志) I've tried deleting the .gradle folder, then going to Build > Clean Project a
在依赖项目module时,出现如下报错: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. at org.gradle.api.internal.tasks.execution.Ex
最近想换个Android开发工具,了解了一下谷歌推出的Android Studio工具(以前一起用Eclipse),同时也给出了很多安卓开发相关的资料链接。本文是总结了安卓巴士上的一些好的帖子,废话不多说了,直接上干 货。 (1)简介 Android Studio 是一个Android开发环境,基于IntelliJ IDEA. 类似 Eclipse ADT,Android Studio 提供了
Program type already present: com.alibaba.android.arouter.routes.ARouter$$Group$$MyRouter2 Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
android 揭示动画 Internal emails between Apple employees reveal the company struggling to defend its position on Right to Repair, a movement that encourages people to fix their own devices. Ahead of yeste
前言 在使用阿里的路由时 由于使用不当 在打包apk的时候 弹出 Program type already present: com.alibaba.android.arouter.routes.ARouter$$Group$$MyRouter2 Learn how to resolve the issue at https://developer.android.com/studio/buil
Issue Activity The issue activity tab contains a sequential record of the Scanner's activity in finding new issues and updating existing issues. This is useful for various purposes: Monitoring the res
github-issue-mover 是能快速迁移 github 上问题的工具。 功能如下: Copy the issue in the destination repo Add references between the issues Close the original issue 在linux操作系统中,repo=repository,表示安装文件的位置,同时,repo也是在linux环境
⚠️ The Isssue label bot is no longer live. You can still view the code, but we have taken down the bot because of related infrastructure costs Code for: "How to automate tasks on GitHub with machine l
嗨,我目前正在玩JavaFX中的GridPane,偶然发现了一个问题...我想创建一个包含三行的布局,其中中间一行增长并占用所有可用空间,但我就是无法让它工作。中间行变得太大,并将窗口下方的底部行“推”到不再可见的位置...我如何使底部行始终在底部,让中间行占用中间的可用空间,但不能再这样了...我将在下面粘贴我的代码。 谢啦! (注意:为清晰起见,代码略有改动,但工作方式相同) 更新!添加“最小
我正在努力获得一个简单的构建和部署工作,并希望得到一些帮助。有人能回顾一下这些步骤,以及为什么发布工件不起作用吗?这是一个简单的Angular 7项目。 错误: [section]Starting:Publish Artifact:dist = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
JAVAlang.LinkageError:无法从本地模块加载器@4c3e4790(finder:local Module finder@38cccef)链接net/sf/json/JSONException(模块“MYAPP:lib(根目录:C:\MYAPPS\EAP-6.4.0\jboss-EAP-6.4\modules,C:\MYAPPS\EAP-6.4.0\jboss-EAP-6.4\mo