An issue with Xamarin.GooglePlayServices Google Drive Sample

Hi all,

I'm trying to learn how to interface with Google Drive, I've downloaded the sample apps as available from the GooglePlayServicesComponents github web page (sorry I can't seem to be able to post links yet).

I am able to compile and run the sample application from the GooglePlayServicesComponents/samples/, but I'm having an issue where I get an error after I select the Google Account when the app starts up. The error is "DriveSample is having trouble with Google Play Services. Please try again". This error happens on an Android 7.1 phone. If I run the app on an Android 9.0 phone nothing happens after I select the Google Account (no messages, nothing). Since I'm new at Xamarin I may have missed something along the line somewhere.

Has anyone here successfully used this component before? Any ideas or suggestions on what I may be doing wrong?


  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Did you use this link for your issue?If you cannot pust link, you can post it as string or code format.

    Based on your error message, You cannot pass the google Auth in your application?

    You could verify the Debug Key with SHA1 in Google Console Develop, If it is correct.

  • kunalsympackunalsympac Member ✭✭
    edited September 10

    Hi Leon, thanks for the reply. Yes I used that link, and you could be right about it being an authentication issue. Where can I find the Debug Key? Is it part of the project properties? I've registered my app with the Google Console and have created a SHA1 key based on the keystore for my app via command line but I'm not sure where to insert it into the project.

  • LeonLuLeonLu Member, Xamarin Team Xamurai
  • kunalsympackunalsympac Member ✭✭

    Thanks for that link Leon, I've actually tried that method before and I end up at the same point, it's driving me nuts. It's as if I'm missing something obvious. Using the code from your link I can get the application to run and there is a prompt to select the Google account, and after I select the account the OnActivityResult returns "Result.Cancelled" which indicates the app has not been registered in the Google Play Developer console. This is not true since I have actually registered the app, and have added the Google Drive API service into the developer console, however I am unsure what to do with the API key that is generated by the developer console - do I have to insert this in my project somewhere?

  • kunalsympackunalsympac Member ✭✭
    edited September 11

    Some progress, I've worked out that I needed to link the Android project to the keystore via Solution Explorer > [projectname.Android] (right click) > Properties > Android Package Signing. With the keystore details configured I am able to sign in successfully. Haven't tried uploading a file yet, will see how it goes from here.

Sign In or Register to comment.