signaturekeron.blogg.se

Dsync google drive with android
Dsync google drive with android






Void OnAuthError(object sender, AuthenticatorErrorEventArgs e)ĭebug.WriteLine("Authentication error: " + e. Store.Delete(account, Constants.AppName) Īwait store.SaveAsync(account = e.Account, Constants.AppName) User = JsonConvert.DeserializeObject(userJson) String userJson = await response.GetResponseTextAsync() Var response = await request.GetResponseAsync() Var request = new OAuth2Request("GET", new Uri(Constants.UserInfoUrl), null, e.Account) Install the app and allow the app permissions to your mobile storage.

dsync google drive with android

On your Android phone, open Google Play Store and search for Autosync for Google Drive. Install the application (there may be a few security pop ups that need to be accepted). Var authenticator = sender as OAuth2Authenticator Īuthenticator.Completed -= OnAuthCompleted Download the Android mobile application on your phone from GitHub. Var presenter = new () Īsync void OnAuthCompleted(object sender, AuthenticatorCompletedEventArgs e) Var authenticator = new OAuth2Authenticator(Īuthenticator.Completed += OnAuthCompleted ĪuthenticationState.Authenticator = authenticator RedirectUri = Constants.AndroidRedirectUri String redirectUri = null switch (Device.RuntimePlatform)ĬlientId = Constants.iOSClientId //Constants is a class with the values stored in it It worked for logging in, but I couldn't get the credentials to work for google drive. AddOnConnectionFailedListener(OnConnectionFailed) Build() mGoogleApiClient = new GoogleApiClient.Builder(this) RequestScopes(new Scope(Constants.scopes)) GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) This is the setup for the client, it works for the drive like this and works for signing in when //.AddApi(Auth.GOOGLE SIGNIN_API,gso) is uncommented and the add scope is removed It seems to be grabbing the google sign in details from some where but is does not explicitly request a sign in.

#DSYNC GOOGLE DRIVE WITH ANDROID HOW TO#

I tried following the example here /questions/38432491/google-drive-api-implementation-xamarin-android and I can get the user to sign on or connecting to the drive to work, but I can not figure out how to make it request a sign in and then upload.

dsync google drive with android

I am trying to implement a feature in my app where the User can upload the excel files created by the app to their Google Drive, Hi, I'm am also facing a similar problem and am also new to to xamarin






Dsync google drive with android