procedure DoShareAction;
var
Intent: JIntent;
Uri: Jnet_Uri;
Uris: JArrayList;
AttachmentFile: JFile;
begin
Intent := TJIntent.Create;
Intent.setAction(TJIntent.JavaClass.ACTION_SEND_MULTIPLE);
Intent.setFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK);
Intent.putExtra(TJIntent.JavaClass.EXTRA_SUBJECT, StringToJString(FFileDesc));
Intent.putExtra(TJIntent.JavaClass.EXTRA_TEXT, StringToJString(FFileDesc));
Intent.setType(GetMimeType);
// Datei anhängen
FTempFile := GenerateTempFile;
AttachmentFile := TJFile.JavaClass.init(StringToJString(FTempFile));
Uri := TJnet_Uri.JavaClass.fromFile(AttachmentFile);
Uris := TJArrayList.Create;
Uris.add(0,
Uri);
Intent.putParcelableArrayListExtra(TJIntent.JavaClass.EXTRA_STREAM, Uris);
TAndroidHelper.Activity.startActivity(TJIntent.JavaClass.createChooser(Intent, StrToJCharSequence('
Bitte Ziel auswählen...')));
end;