I have an app similar to an explorer and allow the user to share folders, multiple folders and multiple files. The share intent will hold a list of all shared files in the end.
If the user shares a folder with 1000 files, this is just to much. But how can I determine if it's possible to share the amount of files the user selected?
I want to check if it's possible to share the amount of files the user selected and if not, I want to tell him that he selected to much files and reached an android limit. In the best case I would like to tell him that his share intent is let's say 2.5MB and that the limit is 1MB, so he can estimate by himself how many files he should select...
Question
- Is it possible to determine if a share intent is < 1MB and therefore is possible to be shared?
- Is it possible to determine the size of a share intent?
Edit
To eliminat confusion:
I don't share files directly in the intent, but only the URI or relative path to the files. So the length of the URI or the length of the relative path is important for the size of the intent, but not if it points to big or small files.
The 1MB limit is valid for the intent (parceled intend I think) and if the intent holds to much data, it will fail SILENTLY and that's the problem
I'm looking for a reusable solution, that works with ANY intent! I am sometimes adding share targets and sometimes not.