Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Feature to Share Multiple Files #3828

Open
Eric-Chomba opened this issue Aug 12, 2024 · 0 comments
Open

Add a Feature to Share Multiple Files #3828

Eric-Chomba opened this issue Aug 12, 2024 · 0 comments

Comments

@Eric-Chomba
Copy link
Contributor

Display.getInstance().share(filePath, null, mimeType);

Successfully shares single files.

Executing the share function in a loop to share 3 different files with different mime types like plain/text, image/jpeg, application/pdf Eg.

for(int f = 0; f < array.length(); f++) {
   JSONObject object = array.getJSONObject(f);
   String filePath = object.getString("Path");
   String mimeType = object.getString("MimeType");  
   Display.getInstance().share(filePath, null, mimeType);

}

Successfully shares all files. But the problem is that the Share Sheet in the device shows 3 times. That is, after sharing 1st file, 2nd Sheet shows to share 2nd file. After sharing 2nd file, 3rd share Sheet shows to share 3rd file.

How can all files be shared via 1 Share Sheet?

Discussion

https://www.reddit.com/r/cn1/comments/1ecuaok/how_can_share_api_share_multiple_files/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant