version:
fix: update:精简api接口,增加新接口地址
This commit is contained in:
@@ -53,45 +53,16 @@ import com.fuying.sn.gson.GsonUtils;
|
||||
import com.fuying.sn.manager.ConnectManager;
|
||||
import com.fuying.sn.manager.ConnectMode;
|
||||
import com.fuying.sn.manager.ControlManager;
|
||||
import com.fuying.sn.network.api.APPJump;
|
||||
import com.fuying.sn.network.api.AddAppInstall;
|
||||
import com.fuying.sn.network.api.AppTimeControlApi;
|
||||
import com.fuying.sn.network.api.AppUsageRecordApi;
|
||||
import com.fuying.sn.network.api.BindDevices;
|
||||
import com.fuying.sn.network.api.BlacklistApi;
|
||||
import com.fuying.sn.network.api.Browser;
|
||||
import com.fuying.sn.network.api.BrowserLabel;
|
||||
import com.fuying.sn.network.api.CloudLessonSettingApi;
|
||||
import com.fuying.sn.network.api.ForceInstall;
|
||||
import com.fuying.sn.network.api.GetAdminAppApi;
|
||||
import com.fuying.sn.network.api.GetAppAndWhiteApi;
|
||||
import com.fuying.sn.network.api.GetBatchApi;
|
||||
import com.fuying.sn.network.api.GetControlScreenshotApi;
|
||||
import com.fuying.sn.network.api.GetGuideApi;
|
||||
import com.fuying.sn.network.api.GetLockScreenPwdApi;
|
||||
import com.fuying.sn.network.api.GetPublicIPApi;
|
||||
import com.fuying.sn.network.api.GetSnRunLogApi;
|
||||
import com.fuying.sn.network.api.GetUploadLogApi;
|
||||
import com.fuying.sn.network.api.MachineTimeControlApi;
|
||||
import com.fuying.sn.network.api.MyAppListApi;
|
||||
import com.fuying.sn.network.api.NewestAppUpdate;
|
||||
import com.fuying.sn.network.api.OverallAppByPlatformApi;
|
||||
import com.fuying.sn.network.api.QRCodeApi;
|
||||
import com.fuying.sn.network.api.QueryAllApp;
|
||||
import com.fuying.sn.network.api.QueryAppInside;
|
||||
import com.fuying.sn.network.api.QuerySnAppStart;
|
||||
import com.fuying.sn.network.api.RunningApp;
|
||||
import com.fuying.sn.network.api.ScreenLock;
|
||||
import com.fuying.sn.network.api.ScreenState;
|
||||
import com.fuying.sn.network.api.Setting;
|
||||
import com.fuying.sn.network.api.AppApi;
|
||||
import com.fuying.sn.network.api.CommonApi;
|
||||
import com.fuying.sn.network.api.FileApi;
|
||||
import com.fuying.sn.network.api.PublicIPApi;
|
||||
import com.fuying.sn.network.api.ScreenStateApi;
|
||||
import com.fuying.sn.network.api.SettingsApi;
|
||||
import com.fuying.sn.network.api.SnApi;
|
||||
import com.fuying.sn.network.api.SnBindApi;
|
||||
import com.fuying.sn.network.api.SnTagApi;
|
||||
import com.fuying.sn.network.api.TimeControl;
|
||||
import com.fuying.sn.network.api.UpdateAdminSn;
|
||||
import com.fuying.sn.network.api.UpdateLockScreen;
|
||||
import com.fuying.sn.network.api.UploadScreenshot;
|
||||
import com.fuying.sn.network.api.UserInfoControl;
|
||||
import com.fuying.sn.network.api.SnControlApi;
|
||||
import com.fuying.sn.network.api.SnInfoApi;
|
||||
import com.fuying.sn.network.api.SnLogApi;
|
||||
import com.fuying.sn.network.interceptor.RepeatRequestInterceptor;
|
||||
import com.fuying.sn.service.LogcatService;
|
||||
import com.fuying.sn.utils.ApkUtils;
|
||||
@@ -234,10 +205,52 @@ public class NetInterfaceManager {
|
||||
return okHttpClient;
|
||||
}
|
||||
|
||||
public GetUploadLogApi getUploadLogApi() {
|
||||
return mRetrofit.create(GetUploadLogApi.class);
|
||||
|
||||
/*
|
||||
*
|
||||
* API
|
||||
*
|
||||
* */
|
||||
|
||||
|
||||
public SnApi getSnApi() {
|
||||
return mRetrofit.create(SnApi.class);
|
||||
}
|
||||
|
||||
public SnInfoApi getSnInfoApi() {
|
||||
return mRetrofit.create(SnInfoApi.class);
|
||||
}
|
||||
|
||||
public SnControlApi getSnControlApi() {
|
||||
return mRetrofit.create(SnControlApi.class);
|
||||
}
|
||||
|
||||
public SnLogApi getSnLogApi() {
|
||||
return mRetrofit.create(SnLogApi.class);
|
||||
}
|
||||
|
||||
public AppApi getAppApi() {
|
||||
return mRetrofit.create(AppApi.class);
|
||||
}
|
||||
|
||||
public SettingsApi getSettingsApi() {
|
||||
return mRetrofit.create(SettingsApi.class);
|
||||
}
|
||||
|
||||
public FileApi getFileApi() {
|
||||
return mRetrofit.create(FileApi.class);
|
||||
}
|
||||
|
||||
public CommonApi getCommonApi() {
|
||||
return mRetrofit.create(CommonApi.class);
|
||||
}
|
||||
|
||||
public ScreenStateApi setScreen() {
|
||||
return mRetrofit.create(ScreenStateApi.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Observable
|
||||
@@ -245,112 +258,112 @@ public class NetInterfaceManager {
|
||||
* */
|
||||
|
||||
public Observable<BaseResponse<SnInfo>> getSnInfoControl() {
|
||||
return mRetrofit.create(SnApi.class)
|
||||
return getSnApi()
|
||||
.getsninfo(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<SystemSettingsSet>> getSettingControl() {
|
||||
return mRetrofit.create(Setting.class)
|
||||
return mRetrofit.create(SettingsApi.class)
|
||||
.getSetting(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<AppInfo>>> getForceInstallControl() {
|
||||
return mRetrofit.create(ForceInstall.class)
|
||||
return getAppApi()
|
||||
.getForceInstall(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<BrowserApiData>> getBrowserControl() {
|
||||
return mRetrofit.create(Browser.class)
|
||||
return getSettingsApi()
|
||||
.getBrowser(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<Label>> getLabelControl() {
|
||||
return mRetrofit.create(BrowserLabel.class)
|
||||
return getSettingsApi()
|
||||
.getLabel(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<AppStart>>> getAppStartControl() {
|
||||
return mRetrofit.create(QuerySnAppStart.class)
|
||||
return getSnControlApi()
|
||||
.getAppStatu(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<AppInfo>>> getQueryAllAppControl() {
|
||||
return mRetrofit.create(QueryAllApp.class)
|
||||
return getAppApi()
|
||||
.getAllApp(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getTimeControlObservable() {
|
||||
return mRetrofit.create(TimeControl.class)
|
||||
return getSnControlApi()
|
||||
.getTimeControl(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<UserAvatarInfo>> getUserAvatarInfoControl() {
|
||||
return mRetrofit.create(UserInfoControl.class)
|
||||
return getSnApi()
|
||||
.getUserAvatarInfo(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getRunningAppObservable(String json) {
|
||||
return mRetrofit.create(RunningApp.class)
|
||||
return getAppApi()
|
||||
.sendAppInfo(Utils.getSerial(), json)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<AppletQRCode>> getQRCodeApiControl() {
|
||||
return mRetrofit.create(QRCodeApi.class)
|
||||
return mRetrofit.create(FileApi.class)
|
||||
.getQRCodeApi()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getAppInsideControl() {
|
||||
return mRetrofit.create(QueryAppInside.class)
|
||||
return getSettingsApi()
|
||||
.getAppInside(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getGetGuideControl() {
|
||||
return mRetrofit.create(GetGuideApi.class)
|
||||
return getFileApi()
|
||||
.getGuidePic(2)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<BatchID>> getBatchApiControl() {
|
||||
return mRetrofit.create(GetBatchApi.class)
|
||||
return getSnApi()
|
||||
.getBatch(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<CloudLessonSetting>> getCloudLessonSettingApiControl() {
|
||||
return mRetrofit.create(CloudLessonSettingApi.class)
|
||||
return getSettingsApi()
|
||||
.getCloudLessonSetting(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<AppInfo>> getUpdateObservable(String packageName) {
|
||||
return getNewestAppUpdateControl()
|
||||
return getAppApi()
|
||||
.getAppUpdate(packageName, "0", JgyUtils.getInstance().checkAppPlatform())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
@@ -358,144 +371,98 @@ public class NetInterfaceManager {
|
||||
|
||||
public Observable<BaseResponse<List<OverallAppBean>>> getOverallAppObservable() {
|
||||
int platformCode = JgyUtils.getInstance().checkAppPlatform();
|
||||
return getOverallAppByPlatformControl()
|
||||
return getAppApi()
|
||||
.getOverallApp(platformCode)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* API
|
||||
*
|
||||
* */
|
||||
|
||||
public BindDevices getbindDevicesControl() {
|
||||
return mRetrofit.create(BindDevices.class);
|
||||
}
|
||||
|
||||
public AddAppInstall getAddAppInstallControl() {
|
||||
return mRetrofit.create(AddAppInstall.class);
|
||||
}
|
||||
|
||||
public APPJump getAppJumpControl() {
|
||||
return mRetrofit.create(APPJump.class);
|
||||
}
|
||||
|
||||
public UpdateAdminSn getUpdateAdminSnControl() {
|
||||
return mRetrofit.create(UpdateAdminSn.class);
|
||||
}
|
||||
|
||||
public NewestAppUpdate getNewestAppUpdateControl() {
|
||||
return mRetrofit.create(NewestAppUpdate.class);
|
||||
}
|
||||
|
||||
public OverallAppByPlatformApi getOverallAppByPlatformControl() {
|
||||
return mRetrofit.create(OverallAppByPlatformApi.class);
|
||||
}
|
||||
|
||||
public UploadScreenshot getUploadScreenshotControl() {
|
||||
return mRetrofit.create(UploadScreenshot.class);
|
||||
}
|
||||
|
||||
public ScreenLock getScreenLockControl() {
|
||||
return mRetrofit.create(ScreenLock.class);
|
||||
}
|
||||
|
||||
public ScreenState setScreen() {
|
||||
return mRetrofit.create(ScreenState.class);
|
||||
}
|
||||
|
||||
public GetControlScreenshotApi getControlScreenshotApi() {
|
||||
return mRetrofit.create(GetControlScreenshotApi.class);
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<AppTimeControl>>> getAppTimeControlObservable() {
|
||||
return mRetrofit.create(AppTimeControlApi.class)
|
||||
return getSettingsApi()
|
||||
.getAppTimeControl(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<MachineControl>> getMachineTimeControlObservable() {
|
||||
return mRetrofit.create(MachineTimeControlApi.class)
|
||||
return getSettingsApi()
|
||||
.getSnTimeControl(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getAppUsageRecordObservable(String pkg, String pkgName, Long open_time, Long close_time) {
|
||||
return mRetrofit.create(AppUsageRecordApi.class)
|
||||
return getCommonApi()
|
||||
.sendAppUsageRecord(Utils.getSerial(), pkg, pkgName, open_time, close_time)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<MyAppUsageBean>>> getMyAppListObservable() {
|
||||
return mRetrofit.create(MyAppListApi.class)
|
||||
return getAppApi()
|
||||
.getMyAppList(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<AppJump>>> getAppJumpObservable() {
|
||||
return getAppJumpControl()
|
||||
return getSnControlApi()
|
||||
.getSNJump(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<BlacklistBean>> getBlacklistObservable() {
|
||||
return mRetrofit.create(BlacklistApi.class)
|
||||
return mRetrofit.create(CommonApi.class)
|
||||
.getBlacklist()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<AppInfo>>> getAdminAppObservable() {
|
||||
return mRetrofit.create(GetAdminAppApi.class)
|
||||
return getCommonApi()
|
||||
.getAdminApp(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<ScreenPassword>> getLockScreenPwdObservable() {
|
||||
return mRetrofit.create(GetLockScreenPwdApi.class)
|
||||
return getSnControlApi()
|
||||
.getLockScreenPwd(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getUpdateLockScreenObservable() {
|
||||
return mRetrofit.create(UpdateLockScreen.class)
|
||||
return getSnControlApi()
|
||||
.updateLockScreen(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<AppAndWhiteBean>>> getAppAndWhiteApiObservable() {
|
||||
return mRetrofit.create(GetAppAndWhiteApi.class)
|
||||
return getCommonApi()
|
||||
.getAppAndWhite(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<SnBindState>> getSnBindObservable() {
|
||||
return mRetrofit.create(SnBindApi.class)
|
||||
return getSnApi()
|
||||
.getSnBind(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<SnRunLog>> getSnRunLogControl() {
|
||||
return mRetrofit.create(GetSnRunLogApi.class)
|
||||
return getSnLogApi()
|
||||
.getSnRunLog(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<SnTag>> getSnTag() {
|
||||
return mRetrofit.create(SnTagApi.class)
|
||||
return getSnApi()
|
||||
.getTag(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
@@ -528,7 +495,7 @@ public class NetInterfaceManager {
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
||||
.build();
|
||||
retrofit.create(GetPublicIPApi.class)
|
||||
retrofit.create(PublicIPApi.class)
|
||||
.getPublicIP()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -881,7 +848,7 @@ public class NetInterfaceManager {
|
||||
@Override
|
||||
public ObservableSource<BaseResponse> apply(String s) throws Throwable {
|
||||
Log.e("SendAppInstallInfo", "apply: " + s);
|
||||
return getAddAppInstallControl()
|
||||
return getAppApi()
|
||||
.installorRemove(Utils.getSerial(), s);
|
||||
}
|
||||
}).subscribeOn(Schedulers.io())
|
||||
@@ -967,7 +934,7 @@ public class NetInterfaceManager {
|
||||
|
||||
public void checkUpdate(String packageName, String versionCode) {
|
||||
Log.e("checkUpdate", "packageName: " + packageName);
|
||||
getNewestAppUpdateControl()
|
||||
getAppApi()
|
||||
.getAppUpdate(packageName, versionCode, JgyUtils.getInstance().checkAppPlatform())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -1905,7 +1872,7 @@ public class NetInterfaceManager {
|
||||
Log.e(TAG, "updateAdminInfo: skip");
|
||||
return;
|
||||
}
|
||||
getUpdateAdminSnControl().sendAdminSn(
|
||||
getSnInfoApi().sendAdminSn(
|
||||
Utils.getSerial(),
|
||||
addr,
|
||||
machine,
|
||||
@@ -2319,7 +2286,7 @@ public class NetInterfaceManager {
|
||||
}
|
||||
|
||||
private Observable<BaseResponse> getSendFile(String path, MultipartBody.Part body) {
|
||||
return getControlScreenshotApi()
|
||||
return getSnInfoApi()
|
||||
.getControlScreenshot(Utils.getSerial(), body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
|
||||
@@ -4,30 +4,32 @@ public class UrlAddress {
|
||||
/*主页接口*/
|
||||
static final String ROOT_URL = "http://47.111.23.154/android/";
|
||||
|
||||
/*绑定设备消息*/
|
||||
public final static String BIND_DEVICES = "sn/bindSn";
|
||||
/*获取设备绑定状态*/
|
||||
public final static String GET_SN_BIND = "sn/getSnBind";
|
||||
/*设备信息接口*/
|
||||
public static final String SN_INFO = "sn/getSnInfo";
|
||||
/*获取设备绑定状态*/
|
||||
public final static String GET_SN_BIND = "sn/getSnBind";
|
||||
/*获取用户头像和信息*/
|
||||
public static final String GET_USER_AVATAR_INFO = "sn/getUserAvatarInfo";
|
||||
/*获取批次*/
|
||||
public static final String GET_BATCH = "sn/getBatch";
|
||||
/*获取标签*/
|
||||
public static final String GET_TAG = "sn/get-tag";
|
||||
|
||||
/*绑定设备消息*/
|
||||
public final static String BIND_DEVICES = "sn/bindSn";
|
||||
/*发送设备基本信息*/
|
||||
public final static String UPDATE_SN_INFO = "sn/updateAdminSn";
|
||||
/*上传屏幕截图*/
|
||||
public final static String UPLOAD_SCREEN_SNAPSHOT = "sn/uploadScreenshot";
|
||||
/*上传控制面版截图*/
|
||||
public static final String UPLOAD_CONTROL_SCREENSHOT = "sn/uploadControlScreenshot";
|
||||
|
||||
/*获取app管控*/
|
||||
public final static String GET_APP_START = "sn/querySnAppStart";
|
||||
/*app跳转管控*/
|
||||
public final static String GET_APP_JUMP = "sn/querySnJump";
|
||||
/*获取时间管控*/
|
||||
public final static String GET_TIME_CONTROL = "sn/getTimeControl";
|
||||
/*上传屏幕截图*/
|
||||
public final static String UPLOAD_SCREEN_SNAPSHOT = "sn/uploadScreenshot";
|
||||
/*上传控制面版截图*/
|
||||
public static final String UPLOAD_CONTROL_SCREENSHOT = "sn/uploadControlScreenshot";
|
||||
/*获取屏幕管控*/
|
||||
public final static String GET_SCREEN_LOCK = "sn/getScreenshot";
|
||||
/*获取锁屏密码*/
|
||||
@@ -47,20 +49,21 @@ public class UrlAddress {
|
||||
public static final String UPLOAD_IS_LOG_FILE = "sn/uploadIsLogFile";
|
||||
|
||||
|
||||
/*获取所有应用时间*/
|
||||
public final static String GET_MY_APP_LIST = "app/myAppList";
|
||||
/*获取所有全局更新*/
|
||||
public final static String GE_TOVERALL_APPBYPLATFORM = "app/overallAppByPlatform";
|
||||
/*根据包名获取更新*/
|
||||
public final static String GET_NEWEST_APPUPDATE = "app/newestAppUpdate";
|
||||
/*获取正在运行的app*/
|
||||
public static final String RUN_NEW_APP = "app/runNewApp";
|
||||
/*获取所有应用*/
|
||||
public final static String GET_ALL_PACKAGE = "app/queryAllApp";
|
||||
/*获取强制下载*/
|
||||
public final static String GET_FORCE_INSTALL = "app/getForceDownload";
|
||||
/*获取所有全局更新*/
|
||||
public final static String GE_TOVERALL_APPBYPLATFORM = "app/overallAppByPlatform";
|
||||
/*根据包名获取更新*/
|
||||
public final static String GET_NEWEST_APPUPDATE = "app/newestAppUpdate";
|
||||
/*获取所有应用时间*/
|
||||
public final static String GET_MY_APP_LIST = "app/myAppList";
|
||||
/*获取正在运行的app*/
|
||||
public static final String RUN_NEW_APP = "app/runNewApp";
|
||||
/*发送卸载或者安装信息*/
|
||||
public final static String SEND_INSTALLEDORREMOVED = "app/addAppInstall";
|
||||
public final static String SEND_APP_INSTALL = "app/addAppInstall";
|
||||
|
||||
|
||||
/*获取系统设置*/
|
||||
public final static String GET_SETTINGS = "control/getSetting";
|
||||
@@ -78,6 +81,26 @@ public class UrlAddress {
|
||||
public final static String GET_SN_TIME_CONTROL = "Control/getSnTimeControl";
|
||||
|
||||
|
||||
/*2026新接口*/
|
||||
/*获取整体管控状态和时长*/
|
||||
public final static String SN_TIME_CONTROL = "control/sn-time-control";
|
||||
/*获取应用管控状态和时长*/
|
||||
public final static String APP_TIME_CONTROL = "control/app-time-control";
|
||||
|
||||
/*获取设备绑定信息*/
|
||||
public final static String DEVICE_INFO = "device/info";
|
||||
/*检查设备守护更新*/
|
||||
public final static String CHECK_UPDATE = "device/check-update";
|
||||
/*使用统计*/
|
||||
/*获取整机控制配置*/
|
||||
public final static String CONTROL_STATUS = "statistics/control-status";
|
||||
/*获取今日剩余时间*/
|
||||
public final static String REMAINING_TIME = "statistics/remaining-time";
|
||||
/*获取今天本周本月使用应用记录*/
|
||||
public final static String APP_USE_TIME = "statistics/app-use-time";
|
||||
/*获取应用控制策略列表*/
|
||||
public final static String APP_CONTROL_DETAIL = "statistics/app-control-detail";
|
||||
|
||||
/*获取小程序二维码*/
|
||||
public static final String GET_APPLET_QRCODE = "file/getAppletQrCode";
|
||||
/*获取操作指南*/
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppJump;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface APPJump {
|
||||
@GET(UrlAddress.GET_APP_JUMP)
|
||||
Observable<BaseResponse<List<AppJump>>> getSNJump(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface AddAppInstall {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_INSTALLEDORREMOVED)
|
||||
Observable<BaseResponse> installorRemove(
|
||||
@Field("sn") String sn,
|
||||
@Field("app") String jsonString
|
||||
);
|
||||
}
|
||||
60
app/src/main/java/com/fuying/sn/network/api/AppApi.java
Normal file
60
app/src/main/java/com/fuying/sn/network/api/AppApi.java
Normal file
@@ -0,0 +1,60 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppInfo;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.MyAppUsageBean;
|
||||
import com.fuying.sn.bean.OverallAppBean;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface AppApi {
|
||||
@GET(UrlAddress.GET_ALL_PACKAGE)
|
||||
Observable<BaseResponse<List<AppInfo>>> getAllApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_FORCE_INSTALL)
|
||||
Observable<BaseResponse<List<AppInfo>>> getForceInstall(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GE_TOVERALL_APPBYPLATFORM)
|
||||
Observable<BaseResponse<List<OverallAppBean>>> getOverallApp(
|
||||
@Query("platform") int platform
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_NEWEST_APPUPDATE)
|
||||
Observable<BaseResponse<AppInfo>> getAppUpdate(
|
||||
@Query("packageName") String packageName,
|
||||
@Query("versionCode") String versionCode,
|
||||
@Query("type") int type
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_MY_APP_LIST)
|
||||
Observable<BaseResponse<List<MyAppUsageBean>>> getMyAppList(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.RUN_NEW_APP)
|
||||
Observable<BaseResponse> sendAppInfo(
|
||||
@Field("sn") String sn,
|
||||
@Field("app") String app
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_APP_INSTALL)
|
||||
Observable<BaseResponse> installorRemove(
|
||||
@Field("sn") String sn,
|
||||
@Field("app") String jsonString
|
||||
);
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
|
||||
import com.fuying.sn.desktop.AppTimeControl;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface AppTimeControlApi {
|
||||
@GET(UrlAddress.GET_APP_TIME_CONTROL)
|
||||
Observable<BaseResponse<List<AppTimeControl>>> getAppTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface BindDevices {
|
||||
@GET(UrlAddress.BIND_DEVICES)
|
||||
Observable<BaseResponse> getBindDevices(
|
||||
@Query("sn") String sn,
|
||||
@Query("id") String id,
|
||||
@Query("type") int type
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.BlacklistBean;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
|
||||
public interface BlacklistApi {
|
||||
@GET(UrlAddress.GLOBAL_BLACKLIST)
|
||||
Observable<BaseResponse<BlacklistBean>> getBlacklist();
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.browser.BrowserApiData;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface Browser {
|
||||
@GET(UrlAddress.SET_BROWSER_URL)
|
||||
Observable<BaseResponse<BrowserApiData>> getBrowser(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.Label;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface BrowserLabel {
|
||||
@GET(UrlAddress.SET_BROWSER_LABEL)
|
||||
Observable<BaseResponse<Label>> getLabel(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.CloudLessonSetting;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface CloudLessonSettingApi {
|
||||
@GET(UrlAddress.GET_CLOUD_LESSON_SETTING)
|
||||
Observable<BaseResponse<CloudLessonSetting>> getCloudLessonSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,15 +1,34 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
|
||||
import com.fuying.sn.bean.AppAndWhiteBean;
|
||||
import com.fuying.sn.bean.AppInfo;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.BlacklistBean;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface CommonApi {
|
||||
@GET(UrlAddress.GLOBAL_BLACKLIST)
|
||||
Observable<BaseResponse<BlacklistBean>> getBlacklist();
|
||||
|
||||
@GET(UrlAddress.GET_APP_AND_WHITE)
|
||||
Observable<BaseResponse<List<AppAndWhiteBean>>> getAppAndWhite(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_ADMIN_APP)
|
||||
Observable<BaseResponse<List<AppInfo>>> getAdminApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
public interface AppUsageRecordApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.APP_USAGE_RECORD)
|
||||
Observable<BaseResponse> sendAppUsageRecord(
|
||||
@@ -19,4 +38,5 @@ public interface AppUsageRecordApi {
|
||||
@Field("open_time") Long open_time,
|
||||
@Field("close_time") Long close_time
|
||||
);
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppletQRCode;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
@@ -7,9 +8,14 @@ import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetGuideApi {
|
||||
public interface FileApi {
|
||||
@GET(UrlAddress.GET_APPLET_QRCODE)
|
||||
Observable<BaseResponse<AppletQRCode>> getQRCodeApi();
|
||||
|
||||
@GET(UrlAddress.GET_OPERATION_GUIDE)
|
||||
Observable<BaseResponse> getGuidePic(
|
||||
@Query("type") int type
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppInfo;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface ForceInstall {
|
||||
@GET(UrlAddress.GET_FORCE_INSTALL)
|
||||
Observable<BaseResponse<List<AppInfo>>> getForceInstall(
|
||||
@Query("sn")String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppInfo;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetAdminAppApi {
|
||||
@GET(UrlAddress.GET_ADMIN_APP)
|
||||
Observable<BaseResponse<List<AppInfo>>> getAdminApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppAndWhiteBean;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetAppAndWhiteApi {
|
||||
@GET(UrlAddress.GET_APP_AND_WHITE)
|
||||
Observable<BaseResponse<List<AppAndWhiteBean>>> getAppAndWhite(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.BatchID;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetBatchApi {
|
||||
@GET(UrlAddress.GET_BATCH)
|
||||
Observable<BaseResponse<BatchID>> getBatch(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.MultipartBody;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetControlScreenshotApi {
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_CONTROL_SCREENSHOT)
|
||||
Observable<BaseResponse> getControlScreenshot(
|
||||
@Query("sn") String sn,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetGuideApiTest {
|
||||
@GET(UrlAddress.GET_OPERATION_GUIDE)
|
||||
Observable getGuidePic(
|
||||
@Query("type") int type
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.ScreenPassword;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetLockScreenPwdApi {
|
||||
@GET(UrlAddress.LOCK_SCREEN_PWD)
|
||||
Observable<BaseResponse<ScreenPassword>> getLockScreenPwd(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.SnRunLog;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetSnRunLogApi {
|
||||
@GET(UrlAddress.GET_LOG_ORDER)
|
||||
Observable<BaseResponse<SnRunLog>> getSnRunLog(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.desktop.MachineControl;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface MachineTimeControlApi {
|
||||
@GET(UrlAddress.GET_SN_TIME_CONTROL)
|
||||
Observable<BaseResponse<MachineControl>> getSnTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.MyAppUsageBean;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface MyAppListApi {
|
||||
@GET(UrlAddress.GET_MY_APP_LIST)
|
||||
Observable<BaseResponse<List<MyAppUsageBean>>> getMyAppList(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppInfo;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface NewestAppUpdate {
|
||||
@GET(UrlAddress.GET_NEWEST_APPUPDATE)
|
||||
Observable<BaseResponse<AppInfo>> getAppUpdate(
|
||||
@Query("packageName") String packageName,
|
||||
@Query("versionCode") String versionCode,
|
||||
@Query("type") int type
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.OverallAppBean;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface OverallAppByPlatformApi {
|
||||
@GET(UrlAddress.GE_TOVERALL_APPBYPLATFORM)
|
||||
Observable<BaseResponse<List<OverallAppBean>>> getOverallApp(
|
||||
@Query("platform") int platform
|
||||
);
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import retrofit2.http.GET;
|
||||
* desc :
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface GetPublicIPApi {
|
||||
public interface PublicIPApi {
|
||||
@GET(UrlAddress.SHOUHU_CITYJSON)
|
||||
Observable<ResponseBody> getPublicIP();
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppletQRCode;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
|
||||
public interface QRCodeApi {
|
||||
@GET(UrlAddress.GET_APPLET_QRCODE)
|
||||
Observable<BaseResponse<AppletQRCode>> getQRCodeApi();
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppInfo;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface QueryAllApp {
|
||||
@GET(UrlAddress.GET_ALL_PACKAGE)
|
||||
Observable<BaseResponse<List<AppInfo>>> getAllApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface QueryAppInside {
|
||||
@GET(UrlAddress.QUERY_APP_INSIDE)
|
||||
Observable<BaseResponse> getAppInside(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppStart;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface QuerySnAppStart {
|
||||
@GET(UrlAddress.GET_APP_START)
|
||||
Observable<BaseResponse<List<AppStart>>> getAppStatu(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface RunningApp {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.RUN_NEW_APP)
|
||||
Observable<BaseResponse> sendAppInfo(
|
||||
@Field("sn") String sn,
|
||||
@Field("app") String app
|
||||
);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface ScreenLock {
|
||||
@GET(UrlAddress.GET_SCREEN_LOCK)
|
||||
Observable<BaseResponse> getScreenshot(
|
||||
@Query("sn")String sn
|
||||
);
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface ScreenState {
|
||||
public interface ScreenStateApi {
|
||||
@FormUrlEncoded
|
||||
@POST(BuildConfig.SCREEN_URL)
|
||||
@Deprecated
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.SystemSettingsSet;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface Setting {
|
||||
@GET(UrlAddress.GET_SETTINGS)
|
||||
Observable<BaseResponse<SystemSettingsSet>> getSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
54
app/src/main/java/com/fuying/sn/network/api/SettingsApi.java
Normal file
54
app/src/main/java/com/fuying/sn/network/api/SettingsApi.java
Normal file
@@ -0,0 +1,54 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.CloudLessonSetting;
|
||||
import com.fuying.sn.bean.Label;
|
||||
import com.fuying.sn.bean.SystemSettingsSet;
|
||||
import com.fuying.sn.bean.browser.BrowserApiData;
|
||||
import com.fuying.sn.desktop.AppTimeControl;
|
||||
import com.fuying.sn.desktop.MachineControl;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SettingsApi {
|
||||
@GET(UrlAddress.GET_SETTINGS)
|
||||
Observable<BaseResponse<SystemSettingsSet>> getSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.SET_BROWSER_URL)
|
||||
Observable<BaseResponse<BrowserApiData>> getBrowser(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.SET_BROWSER_LABEL)
|
||||
Observable<BaseResponse<Label>> getLabel(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.QUERY_APP_INSIDE)
|
||||
Observable<BaseResponse> getAppInside(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_CLOUD_LESSON_SETTING)
|
||||
Observable<BaseResponse<CloudLessonSetting>> getCloudLessonSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_APP_TIME_CONTROL)
|
||||
Observable<BaseResponse<List<AppTimeControl>>> getAppTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_SN_TIME_CONTROL)
|
||||
Observable<BaseResponse<MachineControl>> getSnTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
}
|
||||
@@ -1,11 +1,18 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.BatchID;
|
||||
import com.fuying.sn.bean.SnBindState;
|
||||
import com.fuying.sn.bean.SnInfo;
|
||||
import com.fuying.sn.bean.SnTag;
|
||||
import com.fuying.sn.bean.UserAvatarInfo;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SnApi {
|
||||
@@ -13,4 +20,26 @@ public interface SnApi {
|
||||
Observable<BaseResponse<SnInfo>> getsninfo(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_SN_BIND)
|
||||
Observable<BaseResponse<SnBindState>> getSnBind(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_USER_AVATAR_INFO)
|
||||
Observable<BaseResponse<UserAvatarInfo>> getUserAvatarInfo(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_BATCH)
|
||||
Observable<BaseResponse<BatchID>> getBatch(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_TAG)
|
||||
Observable<BaseResponse<SnTag>> getTag(
|
||||
@Query("sn") String sn
|
||||
// @QueryMap Map<String, String> params
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.SnBindState;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SnBindApi {
|
||||
@GET(UrlAddress.GET_SN_BIND)
|
||||
Observable<BaseResponse<SnBindState>> getSnBind(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.AppJump;
|
||||
import com.fuying.sn.bean.AppStart;
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.ScreenPassword;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SnControlApi {
|
||||
@GET(UrlAddress.GET_APP_START)
|
||||
Observable<BaseResponse<List<AppStart>>> getAppStatu(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_APP_JUMP)
|
||||
Observable<BaseResponse<List<AppJump>>> getSNJump(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_TIME_CONTROL)
|
||||
Observable<BaseResponse> getTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_SCREEN_LOCK)
|
||||
Observable<BaseResponse> getScreenshot(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.LOCK_SCREEN_PWD)
|
||||
Observable<BaseResponse<ScreenPassword>> getLockScreenPwd(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPDATE_LOCK_SCREEN)
|
||||
Observable<BaseResponse> updateLockScreen(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
48
app/src/main/java/com/fuying/sn/network/api/SnInfoApi.java
Normal file
48
app/src/main/java/com/fuying/sn/network/api/SnInfoApi.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.MultipartBody;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SnInfoApi {
|
||||
@GET(UrlAddress.BIND_DEVICES)
|
||||
Observable<BaseResponse> getBindDevices(
|
||||
@Query("sn") String sn,
|
||||
@Query("id") String id,
|
||||
@Query("type") int type
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPDATE_SN_INFO)
|
||||
Observable<BaseResponse> sendAdminSn(
|
||||
@Field("sn") String sn,
|
||||
@Field("address") String address,
|
||||
@Field("machine") String machine,
|
||||
@Field("hardware") String hardware,
|
||||
@Field("software") String software
|
||||
);
|
||||
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_SCREEN_SNAPSHOT)
|
||||
Observable<BaseResponse> uploadScreenshot(
|
||||
@Query("sn") String sn,
|
||||
@Part MultipartBody.Part file
|
||||
);
|
||||
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_CONTROL_SCREENSHOT)
|
||||
Observable<BaseResponse> getControlScreenshot(
|
||||
@Query("sn") String sn,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
|
||||
}
|
||||
@@ -1,21 +1,29 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.SnRunLog;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.MultipartBody;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.Query;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
public interface GetUploadLogApi {
|
||||
public interface SnLogApi {
|
||||
@GET(UrlAddress.GET_LOG_ORDER)
|
||||
Observable<BaseResponse<SnRunLog>> getSnRunLog(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_LOG_FILE)
|
||||
Observable<BaseResponse> UploadLog(
|
||||
Observable<BaseResponse> uploadLog(
|
||||
@QueryMap Map<String, String> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.SnTag;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SnTagApi {
|
||||
@GET(UrlAddress.GET_TAG)
|
||||
Observable<BaseResponse<SnTag>> getTag(
|
||||
@Query("sn") String sn
|
||||
// @QueryMap Map<String, String> params
|
||||
);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface TimeControl {
|
||||
@GET(UrlAddress.GET_TIME_CONTROL)
|
||||
Observable<BaseResponse> getTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface UpdateAdminSn {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPDATE_SN_INFO)
|
||||
Observable<BaseResponse> sendAdminSn(
|
||||
@Field("sn") String sn,
|
||||
@Field("address") String address,
|
||||
@Field("machine") String machine,
|
||||
@Field("hardware") String hardware,
|
||||
@Field("software") String software
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface UpdateLockScreen {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPDATE_LOCK_SCREEN)
|
||||
Observable<BaseResponse> updateLockScreen(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.MultipartBody;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface UploadScreenshot {
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_SCREEN_SNAPSHOT)
|
||||
Observable<BaseResponse> uploadScreenshot(
|
||||
@Query("sn") String sn,
|
||||
@Part MultipartBody.Part file
|
||||
) ;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.UserAvatarInfo;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface UserInfoApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_USER_AVATAR_INFO)
|
||||
Observable<BaseResponse<UserAvatarInfo>> getUserAvatarInfo(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.bean.UserAvatarInfo;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface UserInfoControl {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_USER_AVATAR_INFO)
|
||||
Observable<BaseResponse<UserAvatarInfo>> getUserAvatarInfo(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.fuying.sn.network.newly;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface ControlApi {
|
||||
@GET(UrlAddress.SN_TIME_CONTROL)
|
||||
Observable<BaseResponse> getSnTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.APP_TIME_CONTROL)
|
||||
Observable<BaseResponse> getAppTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.fuying.sn.network.newly;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface DeviceInfoApi {
|
||||
@GET(UrlAddress.DEVICE_INFO)
|
||||
Observable<BaseResponse> getDeviceInfo(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.CHECK_UPDATE)
|
||||
Observable<BaseResponse> checkUpdate(
|
||||
@Query("sn") String sn,
|
||||
@Query("platform") String platform,
|
||||
@Query("app_package") String app_package
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.fuying.sn.network.newly;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface StatisticsApi {
|
||||
@GET(UrlAddress.CONTROL_STATUS)
|
||||
Observable<BaseResponse> getControlStatus(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.REMAINING_TIME)
|
||||
Observable<BaseResponse> getRemainingTime(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.APP_USE_TIME)
|
||||
Observable<BaseResponse> getAppUseTime(
|
||||
@Query("sn") String sn,
|
||||
@Query("query_type") int query_type,
|
||||
@Query("is_all") int is_all
|
||||
);
|
||||
|
||||
@GET(UrlAddress.APP_CONTROL_DETAIL)
|
||||
Observable<BaseResponse> getAppControlDetail(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -936,7 +936,7 @@ public class PushManager {
|
||||
|
||||
synchronized private void bind(final String id, int type) {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getbindDevicesControl()
|
||||
.getSnInfoApi()
|
||||
.getBindDevices(Utils.getSerial(), id, type)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -1091,7 +1091,7 @@ public class PushManager {
|
||||
|
||||
private static Observable<BaseResponse> getSendFile(String path, MultipartBody.Part body) {
|
||||
return NetInterfaceManager.getInstance()
|
||||
.getUploadScreenshotControl()
|
||||
.getSnInfoApi()
|
||||
.uploadScreenshot(Utils.getSerial(), body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
|
||||
@@ -267,8 +267,8 @@ public class LogcatService extends Service {
|
||||
//设置一个file文件
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("file", file.getName(), fileBody);
|
||||
|
||||
NetInterfaceManager.getInstance().getUploadLogApi()
|
||||
.UploadLog(params, body)
|
||||
NetInterfaceManager.getInstance().getSnLogApi()
|
||||
.uploadLog(params, body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
|
||||
@@ -146,7 +146,7 @@ public class ManagerService extends Service implements NetworkUtils.OnNetworkSta
|
||||
|
||||
private void getScreenLockState() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getScreenLockControl()
|
||||
.getSnControlApi()
|
||||
.getScreenshot(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
||||
@@ -351,7 +351,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
@Override
|
||||
public void getScreenLock() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getScreenLockControl()
|
||||
.getSnControlApi()
|
||||
.getScreenshot(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
||||
Reference in New Issue
Block a user