ConstantUtils.java
978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.glsx.libxj.util;
import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.TextHttpResponseHandler;
/**
* @author:
* @createTime:2018/7/3 15:02
* @function:
**/
public class ConstantUtils {
/**
* Tf卡获取数据
*/
public static void getTfData(String path, TextHttpResponseHandler httpResponseHandler) {
AsyncHttpClient client = new AsyncHttpClient();
client.setTimeout(30000);
client.setConnectTimeout(30000);
client.setMaxRetriesAndTimeout(2, 30000);
client.post(path, httpResponseHandler);
}
/**
* Tf卡删除数据
*/
public static void getTfDelet(String path, TextHttpResponseHandler httpResponseHandler) {
AsyncHttpClient client = new AsyncHttpClient();
client.setTimeout(30000);
client.setConnectTimeout(30000);
client.setMaxRetriesAndTimeout(2, 30000);
client.post(path, httpResponseHandler);
}
}