开发者

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[]{"to@email.com"});
                displayIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
                displayIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Text");




                _this.startActivity(Intent.createChooser(displayIntent, "Send Em开发者_JAVA百科ail")); 
            }
            return true;
        }
    });


Change

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

to

  _this.startActivity(displayIntent); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜