Android integration with cloud storage: Google Drive vs Dropbox

Hey everyone! I’m working on an Android app and I’m trying to add cloud storage support. I’ve already got Dropbox working. It was super easy because their SDK is really clear and they have great examples.

Now I’m trying to do the same with Google Drive, but I’m hitting a wall. The Google Drive API seems way more complicated. It’s this big Gdata SDK that’s supposed to work for everything, but it’s making my app huge and it’s not very user-friendly.

Has anyone here successfully integrated Google Drive into their Android app? I’d love to see some example code for basic stuff like uploading and downloading files. Or if you know of any sample apps I could look at, that would be awesome too.

Thanks in advance for any help!

I’ve worked with both Google Drive and Dropbox in my Android apps, and I can relate to your frustration with Google Drive. One approach that worked well for me was using the Google Drive Android API instead of the full Gdata SDK. It’s more focused on Android-specific use cases and integrates better with the platform.

For basic file operations, you might want to look into the DriveContents class. It handles file content operations pretty smoothly. Here’s a quick tip: use the DriveFile.open() method to get a DriveContents object, then you can read or write to it.

As for sample code, the official Android samples repository on GitHub has some good examples for Google Drive integration. They cover common tasks like creating files, opening files, and syncing local changes.

Don’t get discouraged - once you get past the initial setup, working with Google Drive becomes much easier. Keep at it!

I’ve integrated both Google Drive and Dropbox in my Android projects. While Dropbox is straightforward, Google Drive offers more robust features. For Google Drive, I recommend using the Google Drive REST API v3. It’s more lightweight and easier to implement than the full SDK. Start with the official Android quickstart guide on the Google Developers website. It covers authentication and basic file operations. Also, consider using the Google Drive Android API for a smoother user experience. It handles most of the complexity for you, especially with file picking and account selection. Remember to enable the necessary APIs in your Google Cloud Console project before you begin coding.

hey grace, i’ve used both.

google drive can be a pain, but its extra features make it worth it.

try using the REST api instead of the full sdk - it’s lighter and eaiser to work with.

check out a tutorial on vogella. good luck!