I am Creating a small Apps from that user can upload his MS office file to his registered mail ID G_Drive account from android device. and export that file into PDF Format.
for that i taken help form below link :
https://developers.google.com/drive/v2/reference/files/insert#examples
https://developers.google.com/drive/manage-downloads#downloading_google_documents
i created application, and its working fine for small size(< 1MB) file, but when i am sending large size to the g_Drive than i am getting below errors:
java.io.exception Unexpected End of Stream
java.net.SocketTimeoutException: Read timed out
i tried for Resumable upload, but the insert method doesn't have parameter to set this. if am setting the upload type to resumable with
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();
than also its generating same errors.
same case with downloading also.....
please send me some solutions...for this...