package com.example.send; import android.net.Uri; import android.os.Bundle; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.view.Menu; import android.view.View; import android.widget.Button; public class MainActivity extends Activity { private Button button01; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button01 = (Button) this.findViewById(R.id.button1); button01.setOnClickListener(new MyOnclickLis()); } private class MyOnclickLis implements View.OnClickListener{ @Override public void onClick(View v) { Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND); intent.setType("message/rfc822"); //默認收件箱 intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]","[email protected]"}); intent.putExtra(Intent.EXTRA_SUBJECT,"this is title"); intent.putExtra(Intent.EXTRA_TEXT, "this is context"); startActivity(intent); } } }