我有一个问题:我有一个功能可以从图库中获取图像;但是当我选择图像时,我没有得到它。
public void funzione(View v){
int SELECT_IMAGE=1;
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"),SELECT_IMAGE);
我必须通过电子邮件发送这张图片,但我现在不知道如何实现:
Intent i = new Intent();
i.setType("application/octet-stream");
i.setAction(Intent.ACTION_SEND);
i.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ "prova@libero.it" });
i.putExtra(android.content.Intent.EXTRA_SUBJECT, "Test subj");
i.putExtra(android.content.Intent.EXTRA_TEXT, "corpo mail test");
startActivity(Intent.createChooser(i, "Send email"));
}