Simpl3r
=======
Amazon S3 multipart file upload for Android, made simple
![screenshot](https://raw.github.com/jgilfelt/android-simpl3r/master/simpl3r.png "screenshot")
This library provides a simple high level Android API for robust and resumable multipart file uploads using the Amazon S3 service. All the complexity of file chunking, resuming, entity tag caching and interaction with Amazon's S3 API is abstracted from the developer.
This library manages synchronous file part uploads only. Part uploads performed in parallel are generally not suitable for mobile bandwidths.
Usage
-----
Uploads can be initiated as follows:
```java
AmazonS3Client s3Client = new AmazonS3Client(
new BasicAWSCredentials(YOUR_S3_ACCESS_KEY, YOUR_S3_SECRET));
File file = new File("path/to/some.file");
String s3Key = file.getPath();
// create a new uploader for this file
Uploader uploader = new Uploader(this, s3Client, YOUR_S3_BUCKETNAME, s3Key, file);
// register listener for upload progress updates
uploader.setProgressListener(new UploadProgressListener() {
@Override
public void progressChanged(ProgressEvent progressEvent,
long bytesUploaded, int percentUploaded) {
// broadcast/notify ...
}
});
// initiate the upload
String urlLocation = uploader.start();
```
Subsequent `Uploader` instances or calls to `start()` using the same `s3key` will attempt to resume the upload from the beginning of the last part that was uploaded successfully. A `SharedPreferences` instance for the supplied `Context` is used to cache the part ETags, or you can supply your own. You can also supply your own part size to the `Uploader`, but note that the minimum for the S3 API is 5 megabytes.
This project contains a working example project which more fully demonstrates its usage.
Dependencies
------------
This library depends upon the [AWS SDK for Android](http://aws.amazon.com/sdkforandroid/), specifically the following components:
* `aws-android-sdk-<VERSION>-core.jar`
* `aws-android-sdk-<VERSION>-s3.jar`
Building
--------
Run `ant jar` from the project directory or simply download a pre-built version from the `builds` directory of this GitHub repository.
Credits
-------
Author: [Jeff Gilfelt](https://github.com/jgilfelt)
License
-------
Copyright 2012 readyState Software Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
android-simpl3r-文件上传master.zip项目安卓应用源码下载android-simpl3r-文件上传master.zip项目安卓应用源码下载 1.适合学生毕业设计研究参考 2.适合个人学习研究参考 3.适合公司开发项目技术参考
资源推荐
资源详情
资源评论
收起资源包目录
android-simpl3r-文件上传master.zip (56个子文件)
android-simpl3r-文件上传master
android-simpl3r-文件上传master
android-simpl3r-master
simpl3r.png 46KB
.gitignore 99B
AndroidManifest.xml 476B
res
drawable-mdpi
ic_launcher.png 5KB
values-v11
styles.xml 323B
drawable-hdpi
ic_launcher.png 9KB
drawable-xhdpi
ic_launcher.png 14KB
values-v14
styles.xml 380B
values
strings.xml 71B
styles.xml 679B
src
com
readystatesoftware
simpl3r
utils
SharedPreferencesCompat.java 2KB
SharedPreferencesUtils.java 2KB
Uploader.java 10KB
UploadIterruptedException.java 460B
proguard-project.txt 781B
.classpath 356B
LICENSE 11KB
project.properties 563B
builds
Simpl3r-1.0.2.jar 13KB
Simpl3r-1.0.1.jar 13KB
Simpl3r-1.0.jar 12KB
libs
aws-android-sdk-1.4.3-s3.jar 244KB
aws-android-sdk-1.4.3-core.jar 1.48MB
README.md 3KB
.project 810B
example
AndroidManifest.xml 1KB
res
layout
activity_main.xml 2KB
drawable-mdpi-v11
ic_stat_uploading.png 448B
drawable-xhdpi-v9
ic_stat_uploading.png 948B
drawable-xhdpi-v11
ic_stat_uploading.png 848B
drawable-ldpi
ic_stat_uploading.png 543B
ic_launcher.png 2KB
drawable-mdpi
ic_stat_uploading.png 776B
ic_launcher.png 2KB
drawable-mdpi-v9
ic_stat_uploading.png 477B
drawable-ldpi-v9
ic_stat_uploading.png 361B
drawable-ldpi-v11
ic_stat_uploading.png 356B
drawable-hdpi-v9
ic_stat_uploading.png 722B
values-v11
styles.xml 323B
drawable-hdpi
ic_stat_uploading.png 1KB
ic_launcher.png 3KB
drawable-xhdpi
ic_stat_uploading.png 2KB
ic_launcher.png 4KB
values-v14
styles.xml 380B
values
strings.xml 222B
s3config.xml 300B
styles.xml 679B
drawable-hdpi-v11
ic_stat_uploading.png 667B
src
com
readystatesoftware
simpl3r
example
MainActivity.java 4KB
UploadService.java 6KB
proguard-project.txt 781B
.classpath 599B
project.properties 563B
libs
android-support-v4.jar 377KB
.project 997B
build.xml 3KB
共 56 条
- 1
资源评论
yxkfw
- 粉丝: 76
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功