1
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);
String[] recipients = new String[]{"[email protected]"};
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, recipients); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Sending ALL");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Hi This is the Mail");
emailIntent.setType("text/plain");
emailIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivityForResult(Intent.createChooser(emailIntent, "Send mail..."),1);
我有上述電子郵件的意圖和它工作正常,我想發送/丟棄我試圖onActivityResult()
功能message.so後得到的結果代碼,但resultCode
總是0. 對不起,英文請幫我解決這個問題。結果代碼始終是0電子郵件意向的Android
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Toast.makeText(getApplicationContext(),"Result value is" + String.valueOf(resultCode), Toast.LENGTH_SHORT).show();
}
是的,這就是問題所在,更多鈔票結果可以是0,1,-1 但我沒有得到-1或1 .... – gouthaman93
不,你不能到現在...不可能 – Faizan