Open mateusz-szafraniec opened 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());
}
but how do you get the path if isGoogleDriveDocument?
I don't know :/
Hi @jcesarmobile, were you able to find a solution for this issue?
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
Thank u @jcesarmobile
Can I see the code of this solution?
i want the code to this solution
@jcesarmobile In this case, the name of the file will change
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.
i can get the original file name,can you see your create the file code?
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
@jcesarmobile i have select a mp3 ,the ui three have bean blocked
Hi, as in topic. In example app, when i select file from Google Drive returned value is null. Box, Dropbox works fine.