2012-10-21 165 views

回答

0

如果你只是希望用戶將郵件發送給你,你可以使用此代碼。 它使用emailIntent

//letting the user write a email to us 
      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, 
        "subject of mail"); 
      emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, 
        "Insert your mail content"); 
      MainMenuActivity.this.startActivity(Intent.createChooser(
        emailIntent, "Send mail...")); 
相關問題