Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ before_script:
- ./ci/wait_for_emulator.sh
- adb shell input keyevent 82 &

script: ./gradlew connectedInstrumentTest
script: ./gradlew connectedInstrumentTest --info
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## CHANGE LOG

### v6.1.0
2014-09-02 issue [#67](https://github.com/qiniu/android-sdk/pull/67)

- [#64] 1.中断上传;2.uri不能直接转换为File时,转换为InputStream处理; 3.重新分片上传,可设置断点记录;4.重构InputStreamAt,MultipartEntity,CallBack等;


### v6.0.5
2014-07-20 issue [#61](https://github.com/qiniu/android-sdk/pull/61)

Expand Down
2 changes: 1 addition & 1 deletion res/layout/resumable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="暂停"
android:text="STOP"
android:id="@+id/button2" android:layout_toLeftOf="@+id/button1" android:layout_alignTop="@+id/button1"/>
<TextView
android:layout_width="wrap_content"
Expand Down
15 changes: 15 additions & 0 deletions src/com/qiniu/auth/Authorizer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.qiniu.auth;

public class Authorizer {

private String uploadToken;

public String getUploadToken() {
return uploadToken;
}

public void setUploadToken(String uploadToken) {
this.uploadToken = uploadToken;
}

}
12 changes: 0 additions & 12 deletions src/com/qiniu/auth/CallRet.java

This file was deleted.

174 changes: 0 additions & 174 deletions src/com/qiniu/auth/Client.java

This file was deleted.

28 changes: 0 additions & 28 deletions src/com/qiniu/auth/JSONObjectRet.java

This file was deleted.

54 changes: 38 additions & 16 deletions src/com/qiniu/conf/Conf.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
package com.qiniu.conf;

import java.util.Random;

public class Conf {
public static final String VERSION = "6.0.5";
public static final String VERSION = "6.1.0";
public static String UP_HOST = "http://upload.qiniu.com";
public static String UP_HOST2 = "http://up.qiniu.com";

private static String id = genId();

public static String getUserAgent() {
return "QiniuAndroid/" + VERSION + " (" + android.os.Build.VERSION.RELEASE + "; "
+ android.os.Build.MODEL+ "; " + id +")";
}

private static String genId(){
Random r = new Random();
int rnum = r.nextInt(999);
return System.currentTimeMillis() + "" + rnum;
}

public static final String CHARSET = "utf-8";

/**
* HTTP连接超时的时间毫秒(ms)
* Determines the timeout in milliseconds until a connection is established.
* A timeout value of zero is interpreted as an infinite timeout.
*
* Please note this parameter can only be applied to connections that
* are bound to a particular local address.
*/
public static int CONNECTION_TIMEOUT = 30 * 1000;

/**
* 读取response超时的时间毫秒(ms)
* Defines the socket timeout (<code>SO_TIMEOUT</code>) in milliseconds,
* which is the timeout for waiting for data or, put differently,
* a maximum period inactivity between two consecutive data packets).
* A timeout value of zero is interpreted as an infinite timeout.
* @see java.net.SocketOptions#SO_TIMEOUT
*/
public static int SO_TIMEOUT = 30 * 1000;

public static final int BLOCK_SIZE = 1024 * 1024 * 4;
public static int CHUNK_SIZE = 1024 * 256;
public static int FIRST_CHUNK = 1024 * 256;
public static int ONCE_WRITE_SIZE = 1024 * 32;

public static int BLOCK_TRY_TIMES = 2;
public static int CHUNK_TRY_TIMES = 3;

public static String USER_AGENT = null;

public static final int ERROR_CODE = 0;
public static final int CANCEL_CODE = -1;
public static String PROCESS_MSG = "upload alread in process or procssed or canceled.";

}
Loading