Kulwant
Kulwant

Reputation: 1

Android - Email Send Error

I am attempting to have a button that when clicked opens up an email window where email can be sent. I am receiving the following error:

Unsupported action - that action is currently not supported

Here is the my code.

        public boolean onTouch(View v, MotionEvent event) {
            if(event.getAction() == MotionEvent.ACTION_DOWN)
            {

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


                displayIntent.setType("text/plain");
                displayIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"[email protected]"});
                displayIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
                displayIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Text");




                _this.startActivity(Intent.createChooser(displayIntent, "Send Email")); 
            }
            return true;
        }
    });

Upvotes: 0

Views: 1474

Answers (1)

Ryan Reeves
Ryan Reeves

Reputation: 10229

Change

   _this.startActivity(Intent.createChooser(displayIntent, "Send Email")); 

to

  _this.startActivity(displayIntent); 

Upvotes: 3

Related Questions