2010-08-22 90 views

回答

0

您可以在應用程序中保留一個EditText框,並在調用默認電子郵件客戶端時傳遞在相同的使用包中輸入的數據。你可以做同樣的建議使用默認的電子郵件客戶端在Android中,因爲用戶會對跑着的需要剛好從那裏發送郵件的所有登錄憑據信息保存在下面的代碼

Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); 
String[] recipients = new String[]{"[email protected]", "",}; 
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, recipients); 
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Test"); 
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "This is email's message"); 
emailIntent.setType("text/plain"); 
startActivity(Intent.createChooser(emailIntent, "Send mail...")); 

。如果您想從您的應用程序發送郵件,您需要編寫一個可以發送電子郵件的應用程序,並且用戶應該在您的應用程序中再次配置其帳戶。

相關問題