0

I am trying to add in the ability for users of my app to send feedback, and I found an example of how to do it, but the only downside is I don't like the fact that the Email activity seems to be pulling the users email address(I guess the one linked to their phone), and they are allowed to change the To: block. Here is the code I am using. Is there any way I can disable the To: field, and let me enter text into the from field? I'm guessing I would have to create an email address like "myappuser@gmail.com" and use that as the generic email address?`

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);                    
            emailIntent.setType("plain/text");               
            emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ "myappdeveloper@gmail.com"});             
            emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "App Feedback");             
            emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "");     
            MainScreen.this.startActivity(Intent.createChooser(emailIntent, "Send mail..."));
Johnny Rocket
  • 1,394
  • 3
  • 17
  • 25

2 Answers2

1

Try Intent.ACTION_SENDTO instead. Use these links for more help: ACTION_SENDTO and link.

Community
  • 1
  • 1
slybloty
  • 6,346
  • 6
  • 49
  • 70
0

Using this Intent you can mail in android default intent for mail.

Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
droidster.me
  • 558
  • 8
  • 16