-1

i want to include gmail in an android app that i am building so that it could be used as getting feedback from users to a specific gmail. Is there a way.

Neo
  • 1

1 Answers1

0

If I understand correctly, you want a button that will open the default email app and populate your address. Right?

If so, then you can do it by this:

Intent emailIntent = new Intent();
emailIntent.setType("message/rfc822");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {"your.email@gmail.com"});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Your subject");
emailIntent.setAction(Intent.ACTION_SEND);
startActivity(emailIntent);
Ibrahim
  • 2,034
  • 15
  • 22