This project shows how you can use Google Drive as a datastore for your Android and Web apps
This project aims to use a user's personal Google Drive space as a dbstore for web and/or mobile frontend apps.
As an app developer, if you have an use case where you want to sync/store data of each user that he/she can access across multiple apps (web, desktop, mobile), then you can make use of the user's Google Drive space.
You are making an app that keeps track of user's expenses. You have made mobile apps, and now you also want to make a webapp dashboard. To keep the data synced, you have to host a database server yourself - and as an indie developer that is costly. It also makes sense to let each user save their data on their own storage solution instead of on the developer's server (privacy)
NOTE: This is just an example project showing how to use on a webapp and on Android
Go to https://console.developers.google.com Make a new project (let's call it drive-sync-test) Enable Google Drive API on it (https://console.developers.google.com/apis/library?project=drive-sync-test)
Go to https://console.developers.google.com/apis/credentials?project=drive-sync-test Create a Oauth credential for Web app Create an API key for Android App
In the android project edit file app/src/main/AndroidManifest.xml
Replace XXXXXXXXXXXX
with your API Key.
In webapp, edit index.html
Replace XXXXXXXXXXXXX
with Oauth Client ID (The secret is not needed)