I would like to query files uploaded to google drive folder by C# desktop application from an android application.I use google drive API to upload files from C# application with OAuth 2.0 client that i have created in google console. Then i try to get list of files from an android application(using Xamarin.Android) with another OAuth 2.0 android client under same project.Part off code to retrieve files is shown here:
this.GoogleApiClient = new Android.Gms.Common.Apis.GoogleApiClient.Builder(Android.App.Application.Context)
.AddApi(Android.Gms.Drive.DriveClass.API)
.AddScope(Android.Gms.Drive.DriveClass.ScopeFile)
.SetAccountName("xxxx@gmail.com")
.AddConnectionCallbacks(this)
.AddOnConnectionFailedListener(this)
.Build();
GoogleApiClient.Connect();
var query = new Android.Gms.Drive.Query.QueryClass.Builder().AddFilter(Android.Gms.Drive.Query.Filters.Contains(Android.Gms.Drive.Query.SearchableField.Title, "apps.txt")).Build();
var results = await Android.Gms.Drive.DriveClass.DriveApi.Query(googleApiClient, query).AsAsync<Android.Gms.Drive.IDriveApiMetadataBufferResult>();
But it seems that Android.Gms.Drive.DriveClass.ScopeFile returns only files that have been uploaded by same application. It seems a similar question with the one raised here:
Android app, Desktop c# app sharing Google Drive App Data
I wonder if i can add some specific metadata to the files uploaded by C# in order android google API to be able to return these files while querying. Or make some specific configuration in clients configured in google console under same account.