0

I've been trying for a while now to create an application where the users can sign in with their Google Account and the application will automatically upload some files into the users google drive.

So far I've managed to implement the Sign In mechanism but for the Google Drive integration I'm kind of confused if I should use a Service Account or not.

I've found this solution here Google Drive API implementation Xamarin Android but this way too old, and I can't find any updated solutions.

If anyone knows any solution or any suggestion I will appreciate it.

Pavlos Mavris
  • 331
  • 1
  • 2
  • 12

1 Answers1

0

Think of serive accounts as a dummy user, this user can then be preauthorized to access some data.

You could share a folder on google drive with a service account and then the service account would have access to that folder on google drive.

Service accounts are intended for use by developers to access data they control.

If you are going to access the users account then you will need to use Oauth2, and request consent of the user to access their google drive account.

Unforuantatly it appears that Google Drive Android API used in the question you have linked is deprcated.

I can also tell you that the Google .net client library does not support Xamarin authorization.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • Thank you for the answer. With other words, I should develop a native application instead of using Xamarin? – Pavlos Mavris Jan 03 '23 at 21:59
  • Well I have gotten it working years ago using this [GoogleLogin](https://github.com/Pujolsluis/GoogleAuthXamarinSample/blob/997f30b7e0fe8967f2db9ed120528ac5ffe8eb4f/GoogleLogin/GoogleLogin/GoogleLogin.Android/MainActivity.cs) example no idea if it will still work. we are taking around 2019 – Linda Lawton - DaImTo Jan 04 '23 at 07:45