I’m working on an Android app that allows users to store data in Google Drive. Currently, I utilize the official Java client library for authentication and file management. This setup functions well on standard Android devices, but I face challenges with Amazon Fire tablets due to the absence of Google Play Services.
The issue arises because my implementation relies on having Google APIs installed on the device, requiring users to set up a Google account in their settings. Since Fire tablets don’t come with these features pre-installed, it complicates things.
I’m curious if there are other ways to authenticate with Google Drive without using the typical Google API library. Could I possibly use direct HTTP requests or explore different SDKs? Alternatively, should I look into switching to a cloud storage option like Dropbox that may work better with Fire OS devices?
I would really appreciate any guidance. Thank you!
Yes, you can manually implement OAuth 2.0 using HTTP requests to bypass the Google Play Services requirement. I faced a similar issue on an embedded Android system and developed my own authentication flow using WebView for the OAuth process. Start by registering your app in the Google Cloud Console, then directly access the authorization endpoint for tokens. The Google Drive REST API functions well with just the access token and doesn’t require the official library. Although it involves more coding, it provides complete control over authentication and works seamlessly on Fire tablets and other devices without Google Mobile Services.
I’d try Google’s REST API directly with OkHttp or another HTTP client. Hit this same issue deploying to Fire tablets last year and ended up building a custom solution that stores refresh tokens locally after the initial auth. You’ll have to handle token refreshing yourself since there’s no automatic management like you get with Google Play Services. Just intercept 401 responses, refresh the token, then retry the request. Works perfectly on all Android variants including Fire OS. Takes more work upfront but kills the dependency problems completely.
you could also use google drive’s web interface through an embedded browser. just redirect users to google’s oauth page in a webview, grab the auth code, then swap it for tokens with rest calls. works great on fire tablets since it’s all web requests - no play services required. takes a bit more setup but totally doable.