1
イメージを共有するコードを作成しました。下のようにデフォルトの共有コードを使用しました。すべてのデバイスで正常に動作します。しかし、marshmallow OSデバイスのアプリケーションでは共有できません。marshmallowのデフォルト共有を使って共有する方法は?
コード:
Uri imageuri = Uri.fromFile(imageFile);
Intent send_report = new Intent(Intent.ACTION_SEND);
send_report.putExtra(Intent.EXTRA_EMAIL, new String[]{PrefexamList.getString(App.PEMAIL, "")});
send_report.putExtra(Intent.EXTRA_SUBJECT, "Your Result");
send_report.putExtra(Intent.EXTRA_STREAM, imageuri);
send_report.putExtra(Intent.EXTRA_TEXT, "Here attached Your result.");
send_report.setType("text/plain");
send_report.setType("image/png");
startActivityForResult(Intent.createChooser(send_report, "Choose an Email client"), 77);
あなたの答えは、それは、実行時のアクセス許可が原因である可能性があり
をご覧ください! – Vasant
あなたのtargetSdkVersionは何ですか? –
targetSdkVersion = 23 – Vasant