google-drive-android-api

Google Drive Android API and Cross Client Authorization

ぃ、小莉子 提交于 2019-12-11 13:27:40
问题 I use Google Drive Android API for letting users upload files from Google Drive on their Android device to my servers. I would now like to change this setup to allow my servers to have direct access to the users Google Drive, using Cross Client Authorization, which means that I have to generate an ID Token using GoogleAuthUtil.getToken . And this is were everything go off the rails. In order to generate this token I need an Account object. Currently, I'm setting up the GoogleApiClient like

Android Drive Api Lock File while in use

烈酒焚心 提交于 2019-12-11 08:42:18
问题 How can a DriveFile be locked for download while in use by a user? In my case i have a database stored on Drive that needs to be synchronized locally (on the device). To do this, i have to download it and be sure that someone else is't writing on it concurrently before i upload it again. I included the lib 'com.google.android.gms:play-services-drive:10.2.1' . Searching on internet i found the property labels.restricted descripted: Whether viewers and commenters are prevented from downloading,

How to access shared file

╄→гoц情女王★ 提交于 2019-12-11 06:58:21
问题 In my Andorid app, I want to access only those file which is shared with me either by web(drive.google.com) or app. I am using google drive API to access shared file but I am not able to access any file or folder shared with me. My code is given below. public class QueryFilesSharedWithMeActivity extends BaseDemoActivity { private ListView mResultsListView; private ResultsAdapter mResultsAdapter; @Override protected void onCreate(Bundle b) { super.onCreate(b); setContentView(R.layout.activity

How to list all children in Google Drive's appfolder and read file contents with Xamarin / c#?

ε祈祈猫儿з 提交于 2019-12-11 04:37:56
问题 I'm trying to work with text files in the apps folder. Here's my GoogleApiClient constructor: googleApiClient = new GoogleApiClient.Builder(this) .AddApi(DriveClass.API) .AddScope(DriveClass.ScopeFile) .AddScope(DriveClass.ScopeAppfolder) .UseDefaultAccount() .AddConnectionCallbacks(this) .EnableAutoManage(this, this) .Build(); I'm connecting with: googleApiClient.Connect() And after: OnConnected() I need to list all files inside the app folder. Here's what I got so far: IDriveFolder

What happened to 'Listener' with a new version of Google Play Services

ⅰ亾dé卋堺 提交于 2019-12-11 03:38:27
问题 (In Android Studio,) I have updated Google Play Services from com.google.android.gms:play-services:6.1.11, to com.google.android.gms:play-services:6.5.87 which resulted in unresolved: import com.google.android.gms.drive.events.DriveEvent.Listener Can anybody enlighten me on this issue? Release Notes do not mention anything in this area. 回答1: I had this issue also. I believe it became ChangeListener. import com.google.android.gms.drive.events.ChangeListener; 来源: https://stackoverflow.com

How to get the url of a file of google drive to download in android

点点圈 提交于 2019-12-11 03:28:40
问题 I can get the drive id of a file from the google drive. by following code. import com.example.googledrivetest2.ProcessDownload.DownloadFileAsync; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.PendingResult; import com.google.android.gms.common.api.Result; import com.google.android.gms.common.api.ResultCallback; import com

Authorizing the Google Drive Android API

 ̄綄美尐妖づ 提交于 2019-12-11 03:06:58
问题 I tried to access my data in Google Drive over Google Drive Android API (not Web API). What is crazy, that when I use this access, I can access only small part of disk (just a one folder and a few files). I tried to use example code and still, result is same. Any idea what could be wrong? Authorizing @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstance); mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Drive.API) .addScope(Drive.SCOPE_FILE)

How do I work with DriveApi.MetadataBufferResult?

泄露秘密 提交于 2019-12-11 02:59:18
问题 I'm using the Drive API and am starting to get very frustrated. I'm trying to use queries to search for files/folders based on their name. This demo has a good example on how to do this: https://github.com/googledrive/android-demos/blob/master/src/com/google/android/gms/drive/sample/demo/QueryFilesWithAInTitleActivity.java But I don't want to add the data to a ListView, I just want to extract information from the MetadataBufferResult directly (titles, and IDs so I can work with them). But

Get file from Google Drive via shared link

雨燕双飞 提交于 2019-12-11 02:18:20
问题 I'm making something like online journal app, that will download "journal file" from Google Drive (via shared link) once and will update that file if it changes. Please, can anyone point me to some guides how to do it. I already tried to pin file from drive, but I don't really understand what to do next.. 回答1: Downloading Files from Google Drive: To download a Google Drive file via link, try this (from this tutorial): https://drive.google.com/uc?export=download&id=FILE_ID Just replace the

Store Realm files in Google Drive App Folder?

一世执手 提交于 2019-12-11 00:25:52
问题 I am in the early stages of an Android project that will be using a database, hopefully Realm. I want users to be able to access the same database from multiple Android devices (logged in to the same Google account). I am considering placing the Realm files in the Google Drive App folder. I've done some searching, but have found no discussions of this particular configuration. I have no prior experience with either Realm or the Google Drive API, so I'm concerned that there may be some fatal