Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save data using Google sign-in

I've just implemented Google sign-in into my app using the course on Udacity, the developer docs, and a sample on GitHub as resources.

The reason I chose to add sign-in into my app is so that the user could access their data on any devices where they are signed in to that account - i.e. the data would be saved on the cloud, so to speak.

However, I could not really find anything in the developer documentation, or on the Udacity course about how to save data to the cloud using the Google sign-in.

I've looked at the answer to a similar question on Stack Overflow which suggested using the Google Drive Android API to do this.

I've also had a look at databases in Firebase, which is completely new to me.

All of this leads me to believe that I need to use my own server to store the user's data (such as Firebase, I think, which is a paid service), or I should use the Google Drive API.

So, my question is, is there a particular API to save data to the cloud using the user's Google sign-in, or would I have to use my own server, or the Google Drive API?


Edits:

To clarify some points made in the comments, I'm assuming Firebase is a paid service from it's pricings page if I want over 100 simultaneous database connections (which I don't need now, but soon I may have over 100 users saving data simultaneously).

I am aware Firebase has its own authentication system, but I hadn't considered using Firebase until I realised I need somewhere to save the data, which is why I didn't start using it from the beginning.

I know that Firebase isn't the same as Google Drive, but I was wondering which would be best for my purposes. My app currently reads/writes data to an SQLite database on the device. I want to save this data based on the user's Google account, so that they can sign-in on a different device and have the same data.

like image 439
Farbod Salamat-Zadeh Avatar asked Nov 08 '22 07:11

Farbod Salamat-Zadeh


1 Answers

Don't know if it's too late...but

I had a similar thought few days back,came across this document about Google-Drive Api.

This can be used for storing your app's data, which will be retried using the same login.

similar quesion

like image 199
naxrohan Avatar answered Nov 15 '22 05:11

naxrohan