ConstantUtils.java 978 Bytes
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);
    }


}