@Override public void start() { File logFile = Logger.getLogFile(); // TRICKY: make sure the github_oauth2 token has been set int githubTokenIdentifier = AppContext.context() .getResources() .getIdentifier("github_oauth2", "string", AppContext.context().getPackageName()); String githubUrl = AppContext.context().getResources().getString(R.string.github_bug_report_repo); if (githubTokenIdentifier != 0) { GithubReporter reporter = new GithubReporter( AppContext.context(), githubUrl, AppContext.context().getResources().getString(githubTokenIdentifier)); reporter.reportBug(mNotes, logFile); // empty the log try { FileUtils.write(logFile, ""); } catch (IOException e) { e.printStackTrace(); } Logger.i(this.getClass().getName(), "Submitted bug report"); } else if (githubTokenIdentifier == 0) { Logger.w(this.getClass().getName(), "the github oauth2 token is missing"); } }