src/main/java/org/acra/ACRA.java
/**
     * Adds any relevant ReportSenders to the ErrorReporter.
     * 
     * @param errorReporter
     *            ErrorReporter to which to add appropriate ReportSenders.
     */
Adds any relevant ReportSenders to the ErrorReporter.

@param errorReporter
ErrorReporter to which to add appropriate ReportSenders.
Adds any relevant ReportSenders to the ErrorReporter . @param errorReporter ErrorReporter to which to add appropriate ReportSenders .
private static void addReportSenders(ErrorReporter errorReporter) {
        ReportsCrashes conf = getConfig();
        if (!"".equals(conf.mailTo())) {
            Log.w(LOG_TAG, mApplication.getPackageName() + " reports will be sent by email (if accepted by user).");
            errorReporter.addReportSender(new EmailIntentSender(mApplication));
            return;
        }
        final PackageManagerWrapper pm = new PackageManagerWrapper(mApplication);
        if (!pm.hasPermission(permission.INTERNET)) {
            Log.e(LOG_TAG,
                    mApplication.getPackageName()
                            + " should be granted permission "
                            + permission.INTERNET
                            + " if you want your crash reports to be sent. If you don't want to add this permission to your application you can also enable sending reports by email. If this is your will then provide your email address in @ReportsCrashes(mailTo=\"your.account@domain.com\"");
            return;
        }
        if (conf.formUri() != null && !"".equals(conf.formUri())) {
            errorReporter.addReportSender(new HttpPostSender(conf.formUri(), null));
            return;
        }
        if (conf.formKey() != null && !"".equals(conf.formKey().trim())) {
            errorReporter.addReportSender(new GoogleFormSender(conf.formKey()));
        }
    }
private static void addReportSenders ( ErrorReporter errorReporter ) { ReportsCrashes conf = getConfig ( ) ; if ( ! "" . equals ( conf . mailTo ( ) ) ) { Log . w ( LOG_TAG , mApplication . getPackageName ( ) + " reports will be sent by email (if accepted by user)." ) ; errorReporter . addReportSender ( new EmailIntentSender ( mApplication ) ) ; return ; } final PackageManagerWrapper pm = new PackageManagerWrapper ( mApplication ) ; if ( ! pm . hasPermission ( permission . INTERNET ) ) { Log . e ( LOG_TAG , mApplication . getPackageName ( ) + " should be granted permission " + permission . INTERNET + " if you want your crash reports to be sent. If you don't want to add this permission to your application you can also enable sending reports by email. If this is your will then provide your email address in @ReportsCrashes(mailTo=\"your.account@domain.com\"" ) ; return ; } if ( conf . formUri ( ) != null && ! "" . equals ( conf . formUri ( ) ) ) { errorReporter . addReportSender ( new HttpPostSender ( conf . formUri ( ) , null ) ) ; return ; } if ( conf . formKey ( ) != null && ! "" . equals ( conf . formKey ( ) . trim ( ) ) ) { errorReporter . addReportSender ( new GoogleFormSender ( conf . formKey ( ) ) ) ; } }
Adds any relevant ReportSenders to the ErrorReporter.
Adds any relevant ReportSenders to the ErrorReporter .
// Try to send by mail.
 // NB If the PackageManager has died then this will erroneously log
 // the error that the App doesn't have Internet (even though it
 // does).
 // I think that is a small price to pay to ensure that ACRA doesn't
 // crash if the PackageManager has died.
 // If formUri is set, instantiate a sender for a generic HTTP POST form
 // The default behavior is to use the formKey for a Google Docs Form.
