Code example for Activity

Methods: getString

        if (IgnitedIntents.isIntentAvailable(activity, Intent.ACTION_SEND,
                IgnitedIntents.MIME_TYPE_EMAIL)) { 
            String buttonText = activity.getString(R.string.ign_error_report_send_button);
            String bugReportEmailSubject = activity.getString(
                    R.string.ign_error_report_email_subject, error.getClass().getName());
            final String diagnosis = IgnitedDiagnostics.createDiagnosis(activity, error);
            final Intent intent = IgnitedIntents.newEmailIntent(activity, emailAddress,
                    bugReportEmailSubject, diagnosis);
            builder.setNegativeButton(buttonText, new OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
        return builder;
    public static AlertDialog.Builder newErrorHandlerDialog(final Activity activity, int titleId,
            String emailAddress, Exception error) {
        return newErrorHandlerDialog(activity, activity.getString(titleId), emailAddress, error);
     * Creates a AlertDialog that shows a list of elements. The listener's onClick method gets 
     * called when the user taps a list item. 
     * @param <T> 
     *            The type of each element 
     * @param context 
     * @param title 
     *            the title or null to disable the title 
Contextual code suggestions in your IDE  Get Codota for Java