Commit 8679180c by jeffrey

修改返回方式 把日志上传服务器

parent 631b161e
...@@ -22,8 +22,8 @@ android { ...@@ -22,8 +22,8 @@ android {
applicationId "com.xf.weixinclick" applicationId "com.xf.weixinclick"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 25 targetSdkVersion 25
versionCode 6 versionCode 7
versionName "1.5.2" versionName "1.5.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {
cmake { cmake {
......
...@@ -21,4 +21,6 @@ public interface ClientApi{ ...@@ -21,4 +21,6 @@ public interface ClientApi{
Observable<String> devicesScan(@Body Map<String, String> params); Observable<String> devicesScan(@Body Map<String, String> params);
@POST("devices/enable") @POST("devices/enable")
Observable<String> devicesEnable(@Body Map<String, String> params); Observable<String> devicesEnable(@Body Map<String, String> params);
@POST("devices/log")
Observable<String> devicesLog(@Body Map<String, String> params);
} }
...@@ -184,4 +184,16 @@ public class HttpClientApi { ...@@ -184,4 +184,16 @@ public class HttpClientApi {
.observeOn(main) .observeOn(main)
.subscribe(subscriber); .subscribe(subscriber);
} }
public static void uploadDeviceLog(String device_code, String tag, String message, Subscriber<String> subscriber) {
Map<String, String> map = new HashMap<>();
map.put("code", device_code);
map.put("name", tag);
map.put("msg", message);
getInstance().devicesLog(map)
.subscribeOn(io)
.observeOn(io)
.subscribe(subscriber);
}
} }
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 sign in to comment