In V3 there seems to be no way to do this. (I'm using straight HTTP protocol, no wrappers). The items, had a list of urls, being the files in. Java.io.File filePath = new java.io.File(getFilesDir() + java.io.parator + BARCODE_CONTAINER_TEMP_FILE) įileContent mediaContent = new FileContent("text/plain", filePath) įile file = service.files().create(fileMetadata, mediaContent)ītText(R.string. 1 The Google Drive API change from V2 to V3, remove the ems from response. String timeStamp = new SimpleDateFormat("yyyyMMddHHmmss", Locale.forLanguageTag("hu-HU")).format(new ()) įtName("scan_" + timeStamp + ".txt") įtParents(new ArrayList(Arrays.asList(TARGET_FOLDER_ID))) Build a new authorized API client service.įinal NetHttpTransport HTTP_TRANSPORT = new .() ĭrive service = new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT)) Drive API V3 Rev197 1.25.0 License: Apache 2. Here is the code of what I implemented: // Implements OnClick for sendData button Home » » google-api-services-drive Drive API V3 Rev197 1.25.0. I've tried the example provided by google but it seems that this isn't compatible with Android, because it tries to use a library only available in desktop environment. I've done this several times before using a service account in the web appications I developed, but I can't seem to set the connection up correctly in an Android application environment. Let’s see how to easily share a Google Drive folder with your application. I need to save a text file on a shared drive, on Google Drive. Google Drive API v3 will help you accomplish that in a few steps. I'm developing an Android app for internal use in the company I work for.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |