应用上报
This commit is contained in:
@ -2,6 +2,7 @@ package com.gh.gamecenter.manager;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.gh.common.constant.Config;
|
||||
import com.gh.common.util.Installation;
|
||||
import com.gh.common.util.PackageUtils;
|
||||
import com.gh.common.util.TokenUtils;
|
||||
@ -134,7 +135,7 @@ public class DataCollectionManager {
|
||||
/*
|
||||
* 实时上传
|
||||
*/
|
||||
private void realTimeUpload(String type, Map<String, Object> map) {
|
||||
private void realTimeUpload(final String type, Map<String, Object> map) {
|
||||
String version = PackageUtils.getVersionName(mContext);
|
||||
String user = Installation.getUUID(mContext);
|
||||
String channel = (String) PackageUtils.getMetaData(mContext,
|
||||
@ -152,7 +153,15 @@ public class DataCollectionManager {
|
||||
RetrofitManager.getData().postRealData(body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Response<ResponseBody>());
|
||||
.subscribe(new Response<ResponseBody>() {
|
||||
@Override
|
||||
public void onResponse(ResponseBody response) {
|
||||
if ("applist".equals(type)) {
|
||||
mContext.getSharedPreferences(Config.PREFERENCE, Context.MODE_PRIVATE)
|
||||
.edit().putLong("last_upload_applist_time", Utils.getTime(mContext)).apply();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user