I'm trying to upload a new file to a drive account using the V3 API and get upload progress. My current(working) code is the following:
val fileMetadata = File()
fileMetadata.name = newItemName
fileMetadata.parents = mutableListOf(destFolder.remoteId)
val osFile = java.io.File(filePath)
val mediaContent = FileContent(getMimeType(filePath), osFile)
val file = googleDriveService.files().create(fileMetadata, mediaContent)
.setFields("*")
.execute()
Is it possible to add some kind of a progress listener to a current solution or i need to use another service(like MediaHttpUploader)?