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

Android -TransferUtility to upload file on wifi data only #365

Closed
aditimodi04 opened this issue Nov 9, 2017 · 10 comments
Closed

Android -TransferUtility to upload file on wifi data only #365

aditimodi04 opened this issue Nov 9, 2017 · 10 comments
Assignees
Labels
feature-request Request a new feature s3 Issues with the AWS Android SDK for Simple Storage Service (S3).

Comments

@aditimodi04
Copy link

aditimodi04 commented Nov 9, 2017

How to manage amazon s3 file uploading on wifi data only. Don't want to upload on Mobile data

@aditimodi04 aditimodi04 changed the title TransferUtility to upload file on wifi data only Android -TransferUtility to upload file on wifi data only Nov 9, 2017
@mutablealligator mutablealligator added the s3 Issues with the AWS Android SDK for Simple Storage Service (S3). label Nov 21, 2017
@mutablealligator
Copy link
Contributor

Hi @aditimodi04,

Thanks for reporting to us. Currently, the SDK doesn't allow to specify the network configuration (wifi/cellular). But you could use the network connectivity APIs from Android OS to check for the network connection, pause/resume transfers accordingly. We will take it as a feature request.

@mutablealligator mutablealligator added the feature-request Request a new feature label Jan 12, 2018
@mutablealligator
Copy link
Contributor

Pull Request #230 addresses this issue. We will update this thread when the pull request is merged.

@stale
Copy link

stale bot commented Apr 11, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the closing soon Issue will auto-close if there is no additional activity within 7 days. label Apr 11, 2018
@stale
Copy link

stale bot commented Apr 18, 2018

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

@stale stale bot closed this as completed Apr 18, 2018
@vishal-rai
Copy link

@kvasukib Is this feature available now?

@mutablealligator mutablealligator removed the closing soon Issue will auto-close if there is no additional activity within 7 days. label Jun 19, 2018
@tntkhang
Copy link

@kvasukib Is this feature still not available yet?

@mutablealligator
Copy link
Contributor

@vishal-rai and @tntkhang Sorry for the delayed reply. The PR #230 that addresses this feature request has not been resolved from conflicts. Currently, we have TransferUtilityOptions for supplying the optional configuration information necessary for TransferUtility. I will update the team regarding this feature request.

@frankmuellr
Copy link

#575

@mutablealligator
Copy link
Contributor

mutablealligator commented Feb 4, 2019

@aditimodi04 @vishal-rai @tntkhang This feature has been implemented and released in 2.11.1 version of the SDK. See CHANGELOG for more information.

You can use TransferUtilityOptions to pass the network connection type.

Default / Any Network:

TransferUtilityOptions transferUtilityOptions = new TransferUtilityOptions(threadPoolSize, TransferNetworkConnectionType.ANY); 

WiFi only:

TransferUtilityOptions transferUtilityOptions = new TransferUtilityOptions(threadPoolSize, TransferNetworkConnectionType.WIFI); 

Mobile only:

TransferUtilityOptions transferUtilityOptions = new TransferUtilityOptions(threadPoolSize, TransferNetworkConnectionType.MOBILE);
AmazonS3Client s3Client = new AmazonS3Client(AWSMobileClient.getInstance());
s3Client.setRegion(Region.getRegion(Regions.US_EAST_1));

TransferUtilityOptions transferUtilityOptions = new TransferUtilityOptions(threadPoolSize, TransferNetworkConnectionType.WIFI);

TransferUtility transferUtility =
            TransferUtility.builder()
                .context(getApplicationContext())
                .awsConfiguration(AWSMobileClient.getInstance().getConfiguration())
                .s3Client(s3Client)
                .transferUtilityOptions(transferUtilityOptions); // Only WiFi
                .build();

Please let me know if you have feedback.

@mutablealligator mutablealligator added the pending-community-response Issue is pending response from the issue requestor label Feb 4, 2019
@mutablealligator mutablealligator added closing soon Issue will auto-close if there is no additional activity within 7 days. and removed pending-community-response Issue is pending response from the issue requestor labels Feb 28, 2019
@stale stale bot removed the closing soon Issue will auto-close if there is no additional activity within 7 days. label Feb 28, 2019
@frankmuellr
Copy link

This feature has been released. Please try it out and open a new issue if you are observing and issues or have questions.

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 s3 Issues with the AWS Android SDK for Simple Storage Service (S3).
Projects
None yet
Development

No branches or pull requests

5 participants