-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to pause an upload that is WAITING_FOR_NETWORK #102
Comments
Interesting use case. Two requirements from what you described:
|
Correct. The configuration for wifi only was suggested in another thread on this forum. It would be the ideal solution if that would come to pass. The WAITING_FOR_NETWORK problem is because I had to make a workaround for that problem. I still think that especially the CANCEL should be allowed in ANY state that is not a final state (e.g., no use in cancelling a completed or canceled transfer) It would be great if you could fix either or both of these issues. |
The first requirement has been added in v2.2.13 release. Please update the SDK at https://aws.amazon.com/mobile/sdk/. Check out what is changed in the change log. The second one needs some research. I'll leave this issue open as a feature request. |
The second feature is a duplicate of #99. Closing this. |
I orginally wrote something as a question on another issue, but this probably deserves its own issue thread.
When loosing wifi connectivity sometimes the behaviour of the tranfserutility is to pause all ongoing uploads (pauseAllForNetwork) (although most of the time I just get an error...). The pause cancels the submitTask and then changes the state to WAITING_FOR_NETWORK. The pause method however, checks if the submitTask is still running, and fails in other cases. This makes it impossible to explicitly pause an upload that is in state WAITING_FOR_NETWORK. Likewise, it is even impossible to cancel such an upload.
The suggested way to avoid uploading data over 3G is to have your own listener for network states and pause uploads while switching from wifi to 3g. However, currently the above functionality prohibits this. You can only pause an upload after the 3G network comes online state changes back to IN_PROGRESS. My worry is (not tested though) pausing after the upload is restarted, will cause some bytes to slip through the maze.
The text was updated successfully, but these errors were encountered: