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 "[email protected]" 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[]{ "[email protected]"});             
            emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "App Feedback");             
            emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "");     
            MainScreen.this.startActivity(Intent.createChooser(emailIntent, "Send mail..."));

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

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

Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.