I've found a bug today in the ownCloud app, reported it on their github and am now investigating the issue closer by myself. It seems that all apps using the Android document picker are affected (you can test it in Google Drive - it doesn't crash, but it won't start uploading the selected files).
In short: if the user selects too many files (I'm doing 2700+) the system will throw:
12-19 17:28:06.190 1645 10202 E ActivityTaskManager: android.os.TransactionTooLargeException: data parcel size 987616 bytes
This is probably due to Android's limit on intent sizes which seem to be around 1KB (the intent in question is almost 1MB).
Edit: As pointer out in the comments by CommonsWare the maximum size varies, and in this scenario seems to be around 200KB. The bug has already been reported.
The question is: have you ever encountered this problem? Is there any workaround for this, other than building a custom file picker, like maybe an external package?
The fix seems to be easy - just pass a pointer, rather than the Array of files, but I'm not just a self-taught app developer with little experience, so I can't really do it on my own. Is it something I should maybe report to the Android team as a bug?