I am creating small applications from this user that can upload their MS Office file to their registered G_Drive email ID on an Android device. and export this file as a PDF.
To do this, I received a help form below the link:
https://developers.google.com/drive/v2/reference/files/insert#examples
https://developers.google.com/drive/manage-downloads#downloading_google_documents
i created the application and its working tone for a small file (<1MB), but when I send a large size to g_Drive, I get the following errors:
java.io.exception Unexpected End of Stream java.net.SocketTimeoutException: Read timed out
I tried for renewable download, but the insert method has no option to install it. if I set the download type to resume using
service.files().insert(body, mediaContent).set("upload type", "resumable");
or
Insert insertService = service.files().insert(body, mediaContent).setConvert(true); insertService.getMediaHttpUploader().setDirectUploadEnabled(false); insertService.getMediaHttpUploader().setChunkSize(MediaHttpUploader.DEFAULT_CHUNK_SIZE); file = insertService.execute();
and also generates the same errors.
same download case too .....
send me some solutions ... for this ...
source share