google-drive-android-api

Plans for drive.appdata scope in android google drive API

不想你离开。 提交于 2019-12-04 07:41:05
I want to use files in the special application data folder in new android application im developing (aka drive.appdata scope). You guys at google did an excelent job in the new Google Drive Android API which is bundled with the Google Play Services 4.2. But I found out that its not possible to use the appdata folder in the Android API, because there is only the scope drive.file. Now I have to use the generic java/web api in android for this. There are plans to implement the drive.appdata scope in the android API ? When ? Thanks in advance They are being added recently in Google Play Services 4

Android Google Drive SDK - how to show list of files in selected folder

吃可爱长大的小学妹 提交于 2019-12-04 06:41:49
I am struggling to get my code to work. I want my app (when a button is clicked) to show all the folders (and files) in the root folder of the drive. But it seems this is not possible since even though I have authorised the app using Ouath2, the app only has access to the files and folder that the user selects. The behaviour is strange in that when the folder picker opens, it only lists the contents of that folder if the contents ARE folders. It will not list any files at all. Could an expert please look at my code and tell me where I am going wrong? I am using the PickFolderWithOpener

How to download file from Google Drive using Drive.API?

ⅰ亾dé卋堺 提交于 2019-12-04 01:07:25
问题 I am using Google Drive.Api in order to get user's app data synced with users drive account. The user database is in sqlite database format. I have successfully uploaded the file in binary to the drive but failing to download the file from within the app. How I get the file URl : final GoogleAccountCredential credential = GoogleAccountCredential.usingOAuth2(this, Arrays.asList(DriveScopes.DRIVE_FILE)); credential.setSelectedAccountName(accountName); service = new com.google.api.services.drive

get path from Google Drive URI

纵然是瞬间 提交于 2019-12-03 08:14:56
I'm using Android file selection and selecting files from app storage (images, videos, documents). I have an function "getPath" . Im getting path from uri. I have no problem with gallery images or download documents. But when i select a file from google drive i cant get path. This is the google drive uri "content://com.google.android.apps.docs.storage/document/acc%3D25%3Bdoc%3D12" Can you help me about it ? This is also my "getPath" function. public static String getPath(final Context context, final Uri uri) { // check here to KITKAT or new version final boolean isKitKat = Build.VERSION.SDK

Store the sqlite Database into google drive

╄→尐↘猪︶ㄣ 提交于 2019-12-03 07:17:19
问题 I have tried many example and did not find any good solution. I want to store the data of my app to store in sqlite database then sync it with the google drive account of the user who installed the app. There is also a button which will show the data from google drive and user can edit and update the data so the updated data is then store in the google drive. I'm new in Android development please help me. I also have applied the following example but did not succeed. https://github.com

How to avoid from always loading cached app data from Google Drive

妖精的绣舞 提交于 2019-12-03 06:27:58
问题 Currently, I'm using Google Drive Android API, to store my Android app data, to Google Drive App Folder . This is what I'm doing when saving my application data Generate a checksum for the current local zip file. Search in Google Drive App Folder , to see whether there is an existing App Folder zip file. If there is, overwrite the content of existing App Folder zip file, with current local zip files. Also, we will rename existing App Folder zip filename, with the latest checksum. If there isn

com.google.android.gms.common.api.ApiException: 17: API: Drive.API_CONNECTIONLESS is not available on this device

喜欢而已 提交于 2019-12-02 23:28:57
Here is the story. I had integrated Google Drive Android SDK (8.1.0) into my app ( AnyCopy ) around three years ago. And I followed the tutorial to set up properly including adding credentials and api key. Everything worked okay. I could backup and restore my data without any problem. Even today it works okay if I download it from Google Play. Recently I have been trying to refactor AnyCopy and integrate the newest Google Drive Android SDK (Google Play Service Version number 12.0.1 )into my app and experiencing a strange error with message java.util.concurrent.ExecutionException: com.google

How to avoid from always loading cached app data from Google Drive

☆樱花仙子☆ 提交于 2019-12-02 19:55:42
Currently, I'm using Google Drive Android API , to store my Android app data, to Google Drive App Folder . This is what I'm doing when saving my application data Generate a checksum for the current local zip file. Search in Google Drive App Folder , to see whether there is an existing App Folder zip file. If there is, overwrite the content of existing App Folder zip file, with current local zip files. Also, we will rename existing App Folder zip filename, with the latest checksum. If there isn't existing App Folder zip file, generate a new App Folder zip file, with local zip file's content. We

Store the sqlite Database into google drive

安稳与你 提交于 2019-12-02 19:51:02
I have tried many example and did not find any good solution. I want to store the data of my app to store in sqlite database then sync it with the google drive account of the user who installed the app. There is also a button which will show the data from google drive and user can edit and update the data so the updated data is then store in the google drive. I'm new in Android development please help me. I also have applied the following example but did not succeed. https://github.com/seanpjanson/GDAADemo Create / Edit / Retrieve DB file with GDAA (Google Drive Api for Android) Unpredictable

Filters.ownedByMe doesn't work in 'Drive API for Android' (But works correctly in 'API Client Library for Java')

风格不统一 提交于 2019-12-02 19:17:21
问题 Previously, I'm using "API Client Library for Java" to perform file search in appdata folder. File searching code in API Client Library for Java private static void searchFromGoogleDrive(Drive drive, String qString) { try { Files.List request = drive.files().list().setQ(qString); do { FileList fileList = request.execute(); for (com.google.api.services.drive.model.File f : fileList.getItems()) { final String title = f.getTitle(); if (title == null || f.getDownloadUrl() == null || f