Skip to content
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

Closed
erikvdvelden opened this issue Feb 23, 2016 · 4 comments
Closed

Unable to pause an upload that is WAITING_FOR_NETWORK #102

erikvdvelden opened this issue Feb 23, 2016 · 4 comments
Labels
feature-request Request a new feature

Comments

@erikvdvelden
Copy link

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.

@fosterzhang fosterzhang added question General question feature-request Request a new feature labels Feb 23, 2016
@fosterzhang
Copy link
Contributor

Interesting use case. Two requirements from what you described:

  • allow pausing or canceling a transfer in WAITING_FOR_NETWORK
  • add a configuration to transfer in wifi only
    First one is easy to do. I can add it quickly. The second one needs some research. I'll get back to you ASAP. Thank you very much for your suggestions.

@erikvdvelden
Copy link
Author

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.

@fosterzhang
Copy link
Contributor

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.

@fosterzhang fosterzhang removed the question General question label Feb 26, 2016
@fosterzhang
Copy link
Contributor

The second feature is a duplicate of #99. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

2 participants