iPaulPro / aFileChooser

[DEPRECATED] Android library that provides a file explorer to let users select files on external storage.
Apache License 2.0
1.79k stars 850 forks source link

Google Drive not working #40

Open mateusz-szafraniec opened 10 years ago

mateusz-szafraniec commented 10 years ago

Hi, as in topic. In example app, when i select file from Google Drive returned value is null. Box, Dropbox works fine.

yoavst commented 10 years ago

You can use this method to check if Google drive selected:

public static boolean isGoogleDriveDocument(Uri uri) {
return "com.google.android.apps.docs.storage".equals(uri.getAuthority());
}
jcesarmobile commented 10 years ago

but how do you get the path if isGoogleDriveDocument?

yoavst commented 10 years ago

I don't know :/

MichalRadwantzor commented 10 years ago

Hi @jcesarmobile, were you able to find a solution for this issue?

jcesarmobile commented 10 years ago

Not really a solution, but I get the InputStream from the drive file and store it on a temp folder and use this copy of the drive file instead of the original file

MichalRadwantzor commented 10 years ago

Thank u @jcesarmobile

danieltigse commented 8 years ago

Can I see the code of this solution?

samuelt1 commented 7 years ago

i want the code to this solution

xiangcman commented 6 years ago

@jcesarmobile In this case, the name of the file will change

jcesarmobile commented 6 years ago

Yeah, it's a copy, so you have to create the file and name it. I don't remember if it's possible to get the original file name and use the same.

xiangcman commented 6 years ago

i can get the original file name,can you see your create the file code?

jcesarmobile commented 6 years ago

Sorry, I used it in a project long time ago, but don't have the code anymore.

But I probably just googled how to create a file from InputStream

xiangcman commented 6 years ago

@jcesarmobile i have select a mp3 ,the ui three have bean blocked