Forum Xamarin.Android

Help with google drive API

Hi guys i'm trying to make an android app that first take a picture and then put it on my google drive account. I have already made a simple code to take a picture and save it in local folder. How can i connect my app to google Drive and send this image to my account Drive? Thank you and sorry for my bad english.

Answers

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    I think the simple way is to use rest api

    https://developers.google.com/drive/v2/reference/
  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    I think the simple way is to use rest api

    https://developers.google.com/drive/v2/reference/
  • BrianConradBrianConrad USMember ✭✭✭

    This Xamarin example code will work. The instructions are in the "component" folder as how to implement it. The problem is that it is a bit incomplete. It should upload a one line piece of text and demonstrate how to tell the user that it was successfully uploaded. And then it needs to do a download that piece of text and also notify the user it was downloaded. Then it would be more useful as a guide.
    https://components.xamarin.com/view/googleplayservices-drive

    I implemented drive upload and download in my apps last year in Java using the Android Quickstart demo as a guide. But things are a little different in C# and Xamarin. In the Java version you call specific callbacks but I've yet to figure that out in Xamarin. Using IResultCallback as an "extension" works but you will need more than one callback, i.e.:
    SetResultCallback(mycallback) instead of SetResultCallback(this) which calls IResultCallback.OnResult.

Sign In or Register to comment.