このコードを使用してファイルを共有しています:
Uri fileUri = Uri.fromFile(new File(filePath));
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("audio/mp3");
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "subject");
shareIntent.putExtra(Intent.EXTRA_TEXT, "body");
shareIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
startActivity(Intent.createChooser(shareIntent, "Share"));
ファイル名は「a123456789cd.mp3」です。実際のファイル名を変更することはできないため、添付ファイルのみを「myRecording.mp3」などの意味のある名前に変更する必要があります。それは可能ですか?
ご協力いただきありがとうございます