google-drive-android-api

can you tell me what's wrong with this google drive API call function in PHP

巧了我就是萌 提交于 2020-01-06 07:09:26
问题 I've got this code to run and fetch images from my drive. But i'm running into a problem every time I run this code. function listF() { $result = array(); $tok = array(); $nextPageToken = NULL; do { try { $parameters = array(); if ($nextPageToken) { $parameters['pageToken'] = $nextPageToken; $parameters['q'] = "mimeType='image/jpeg' or mimeType='image/png'"; } $files = $this->service->files->listFiles($parameters); $tok[] = $nextPageToken; $result = array_merge($tok, $result, $files->getFiles

Downloading Images from Google Drive using Google Drive Android API?

南笙酒味 提交于 2020-01-05 14:11:30
问题 Basically, I have been using this guide: https://developers.google.com/drive/android/intro I have gotten the picture to upload into drive with the help of: https://github.com/googledrive/android-demos/tree/master/src/com/google/android/gms/drive/sample/demo However, the GitHub project linked above does not provide any way to retrieve Images from Drive, it only shows text files. I am aware of the QueryNonTextFilesActivity.java but this gives the result in MetaDataBuffer which is appended onto

Drive Api save to folder, if folder doesnt exist, create than save

谁说胖子不能爱 提交于 2020-01-05 09:36:30
问题 im using the Google Drive API to save(use as backup) a database there, its working nice, but just if i use the ROOT the Api Call: MetadataChangeSet metadataChangeSet = new MetadataChangeSet.Builder() ......build(); Drive.DriveApi.getRootFolder(mGoogleApiClient) .createFile(mGoogleApiClient, metadataChangeSet, result.getDriveContents()) .setResultCallback(fileCallback); CallBack to Save the file: final public ResultCallback < DriveFolder.DriveFileResult > fileCallback = new ResultCallback <

Google Drive API - get list of files including folders

。_饼干妹妹 提交于 2020-01-02 08:50:43
问题 I need to list all images in a users drive cloud. I use https://www.googleapis.com/drive/v2/files with the correct filter to query all images. I need to group the result in my app in folders. I know a file can have multiple parents, that's fine. I would like to avoid making and calls (for every single file a single call) to get a files folder via https://developers.google.com/drive/v2/reference/files/get using the parent id from the first call. Is there a network friendly way to get all files

Android Google Drive Rest API: skip consent screen (hardcoded account)

眉间皱痕 提交于 2020-01-02 08:38:52
问题 I was trying to use Google Drive to sync some media files (video/images) and show them in my android app. I've managed to make it all work fine but according to the docs (or at least from a first read) it looks like there must always be a consent screen where the user, after choosing his google account, agrees with the app getting data from his drive. The point is that I'd like to 'hardcode' an account that programatically agrees to that since our app is always going to take the media from

Accessing public Google Drive folder from Android app without authenticating

耗尽温柔 提交于 2020-01-02 03:21:19
问题 I'd like for my app to be able to read from a pre-defined shared public Google Drive folder without the user having to log in or choose a Google account. Background / Environment Using my desktop browser, I have created a public folder on my Google Drive that is set up to be public. Anyone with the link may access (read) the drive, so no authorization is required: In my Android Studio project, I have gone into File > Project Structure > Dependencies and added com.google.android.gms:play

Google Drive API is not working after Proguard obfucation

怎甘沉沦 提交于 2020-01-01 20:48:28
问题 I am using compile 'com.google.android.gms:play-services-auth:10.0.1' compile 'com.google.android.gms:play-services-drive:10.0.1' to implement Google Drive in my Android app. The app is working well until i obfuscate the application with Proguard. Once the application is obfuscated, while i try to enable Google Drive Backup option, the app pop-ups the account selection dialog and doesn't proceed after that. In the debug version of the app, while i try to enable Google Drive Backup option, the

How to select files from google drive in android?

↘锁芯ラ 提交于 2020-01-01 09:42:56
问题 Is there any way to start file picker for google drive in android app - to do something similar to this http://googleappsdeveloper.blogspot.com/2012/08/allowing-user-to-select-google-drive.html. I need to allow user to select files from google drive, so I can use their bytes in my application. Thanks. 回答1: Yes, there is a file picker in the GDAA. The best place to see it's use is this demo, specifically the Intents section. There are 2 methods in the demo you are interested in: the 'Pick a

LogIn to google drive on android without adding the google account to the device

流过昼夜 提交于 2020-01-01 05:14:26
问题 I develop an android application that needs to allow read/write access to user's google drive. In addition, it is supposed to run on public devices (meaning that many people might use same device to access their google drive account). In such circumstances, it is unacceptable to add each user's account to Android Account Manager. Unfortunately, all official guides, use the authentication with the google account registered on device. The popup of selecting existing google accounts from device

Get list of files from a specific folder in google drive

守給你的承諾、 提交于 2019-12-31 03:52:06
问题 I am using Google Play Services SDK. And tried the Demos from developer site. Is there a way to get(download) all the files from a specific folder? Any pointer will be of great help. The whole sample code doesn't seem to be complete. 回答1: Here is the 'await' version of a method that does something similar (must be run on non-ui thread). // list / search all non-trashed files in a folder (globally if 'fldr' is null) GoogleApiClient _gac; public void findAll(String title, String mime,