Add way to send feedback via email

This commit is contained in:
YuviPanda 2013-04-10 00:16:53 +05:30
parent 1d603cd9eb
commit d76541ceec
4 changed files with 15 additions and 0 deletions

View file

@ -59,6 +59,9 @@ public class CommonsApplication extends Application {
public static final String DEFAULT_EDIT_SUMMARY = "Uploaded using Android Commons app";
public static final String FEEDBACK_EMAIL = "mobile-feedback-l@lists.wikimedia.org";
public static final String FEEDBACK_EMAIL_SUBJECT = "Commons Android App (%s) Feedback";
public static AbstractHttpClient createHttpClient() {
DefaultHttpClient client = new DefaultHttpClient();

View file

@ -225,6 +225,13 @@ public class ContributionsListFragment extends SherlockFragment {
Intent aboutIntent = new Intent(getActivity(), AboutActivity.class);
startActivity(aboutIntent);
return true;
case R.id.menu_feedback:
Intent feedbackIntent = new Intent(Intent.ACTION_SEND);
feedbackIntent.setType("message/rfc822");
feedbackIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { CommonsApplication.FEEDBACK_EMAIL });
feedbackIntent.putExtra(Intent.EXTRA_SUBJECT, String.format(CommonsApplication.FEEDBACK_EMAIL_SUBJECT, CommonsApplication.APPLICATION_VERSION));
startActivity(feedbackIntent);
default:
return super.onOptionsItemSelected(item);
}