Commit de0673c6 by sikang

update

parent ec67148a
......@@ -2,7 +2,7 @@ defaultTasks 'clean', 'assembleAppProductWebsiteReleaseChannels'
ext {
// sdk & tools
minSdkVersion = 19
minSdkVersion = 21
targetSdkVersion = 28
compileSdkVersion = 28
buildToolsVersion = '28.0.3'
......
......@@ -292,6 +292,8 @@ public interface UserApi {
@GET("record/employ-photo")
Observable<RecordFilesResponse> getJobImg();
@GET
Observable<ResponseBody> analytics(@Url String url);
@GET("record/bankcard")
Observable<UserBankInfo> getBankCardInfo();
......@@ -353,4 +355,6 @@ public interface UserApi {
@Query("passbackparams") String passbackparams);
}
......@@ -29,6 +29,7 @@ import org.json.JSONException;
import org.json.JSONObject;
import java.io.File;
import java.io.IOException;
import java.util.List;
import io.reactivex.Observable;
......@@ -915,4 +916,37 @@ public class UserPresenter extends BasePresenter<UserApi> {
// }
@SuppressLint("CheckResult")
public void analytics(String action) {
String url = "http://13.250.10.209:8878/google/analytics/" + LibConfig.APPLICATION_ID + "/" + AppInfoUtils.getAndroidID(LibConfig.getContext());
handleRequest(getApiService().analytics(url), new HttpObserver<ResponseBody>() {
@Override
public void onStart() {
}
@Override
public void onSuccess(ResponseBody data) {
try {
if(data.string().equals("ok")) {
view.onHttpSuccess(action, "ok");
}
} catch (IOException e) {
view.onHttpSuccess(action,"");
e.printStackTrace();
}
}
@Override
public void onError(int code, String msg) {
Log.d("analytics",msg);
}
@Override
public void onFinish() {
}
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment