Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Drive Android Integration Sample [closed]

Are there any samples to integrate Google Drive with Android? I'm now using Dropbox and their Android SDK is very easy to integrate. For Google Drive, I found the samples all for web apps not for Android. Can anyone share some Google Drive samples for Android? Thanks!

like image 539
Wenbo Avatar asked Sep 11 '26 19:09

Wenbo


1 Answers

i have an app that creates a file and then shares it with other apps. I use a chooser to let the user decide which app to share with. Set the file type to "multipart/*" and then Google Drive can pick it up, and so can Dropbox, EverNote, Bump and lots of others - all without that annoying authorization crap, which you and your users implicitly did already when those apps were installed on the devicxe

    Intent intent = new Intent(android.content.Intent.ACTION_SEND);
            intent.putExtra(Intent.EXTRA_STREAM, Uri.parse ("file://" + filePath));

    intent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
    intent.putExtra(android.content.Intent.EXTRA_TEXT, text);
    intent.setType("multipart/*");
        startActivity(Intent.createChooser(intent, text));
like image 133
Martin Avatar answered Sep 13 '26 10:09

Martin