Cancel Google Drive upload possible?

后端 未结 4 689
长情又很酷
长情又很酷 2020-12-31 13:22

I have written an app using the official API to upload to Google drive, this works perfectly. However I can\'t find anyway to cancel an upload. I\'m running it in an ASync

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-31 14:15

    Great question! I filed a feature request for the ability to cancel a media upload request:

    https://code.google.com/p/google-api-java-client/issues/detail?id=671

    However, this may a difficult feature to implement based on the current design of that library.

    Another option to consider is to not use AsyncTask and instead implementing the multi-threading yourself and abort the running Thread. Not pleasant, but may be your only option for doing this now.

提交回复
热议问题