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

[Android] Unable to pick native files from Google Drive (i.e.: docs, spreadsheet, slides) #467

Open
lucasftcruz opened this issue Sep 10, 2021 · 6 comments
Labels
addressed in premium version This issue has been addressed (implemented, fixed) in the package available to sponsors.

Comments

@lucasftcruz
Copy link

Bug report

Summary

Unable to pick native files from Google Drive (i.e.: google docs, spreadsheet, slides) on Android as they are disabled, pdfs and images work fine though. iOS has no issues.

I tried to add the google mime types to the type key in the options prop as you can see below in the sample code, but that is not accepted. DocumentPicker.types.allFiles seems to not include google drive file types.

If the library is missing support or will not support this feature, which I believe it should. Can someone please point me in the right direction of how to get it working?

Reproducible sample code

Current implementation

public static pickFile(options = { type: [DocumentPicker.types.allFiles] }) { return DocumentPicker.pick(options).then((filePicked) => { ... }); }

My unsucessfull tentative of get the google docs working:

public static pickFile(options = { type: [DocumentPicker.types.allFiles, 'application/vnd.google-apps.document'] }) { return DocumentPicker.pick(options).then((filePicked) => { ... }); }

Steps to reproduce

  1. Launch the Picker
  2. Select Google Drive Folder
  3. Google Docs, Google SpreadSheet and Google Slides are disabled and unable to be selected on Android

Describe what you expected to happen:

  1. Be able to select Google Docs, Google SpreadSheet and Google Slides from the picker on Android

Environment info

Tested on versions:

  • RN 0.60.4 + react-native-document-picker: 4.3.0
  • RN 0.64.2 + react-native-document-picker: 6.0.4

iOS version: -
Android version: 11

Screenshot_20210910-095441_Files

@lucasftcruz
Copy link
Author

Anyone?

@lucasftcruz
Copy link
Author

+1

@vonovak
Copy link
Collaborator

vonovak commented Oct 5, 2021

hello @lucasftcruz, please be so kind and stop +1 ing your posts - it's spamming the maintainers (me). I'm currently focusing my time on other OSS projects I maintain or projects that pay the bills. Until I get back to this repo, I suggest that you try to investigate the situation yourself and perhaps share (add to the original post) what you have tried and found 🙂 . Thanks! 👍

@pankajjolapara
Copy link

@lucasftcruz Yes, facing same issue, did you get any solution?
cc: @vonovak

@vonovak
Copy link
Collaborator

vonovak commented Jan 23, 2023

So just to follow up on this, the reason google docs cannot be selected is because the package does not support virtual files.
Details are explained here https://www.youtube.com/watch?v=4h7yCZt231Y

@vonovak
Copy link
Collaborator

vonovak commented Mar 23, 2024

Hello,
to follow up again, the new package now supports virtual files, see docs.

Hope this helps 🙂

@vonovak vonovak added the addressed in premium version This issue has been addressed (implemented, fixed) in the package available to sponsors. label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in premium version This issue has been addressed (implemented, fixed) in the package available to sponsors.
Projects
None yet
Development

No branches or pull requests

3 participants