From 0e8fc8d9e8764432ffa2ef574b979f003fe4503b Mon Sep 17 00:00:00 2001 From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674> Date: 星期二, 25 七月 2017 13:52:56 +0800 Subject: [PATCH] --- VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/DeviceMng.java | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/DeviceMng.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/DeviceMng.java index 36bb3d1..c6253f0 100644 --- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/DeviceMng.java +++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/DeviceMng.java @@ -37,7 +37,7 @@ public void run() { try { while (true) { - AttendanceDao.getInstance().reloadLeftList(null, 0, false); + //AttendanceDao.getInstance().reloadLeftList(null, 0, false); if (!BaseApplication.getInstance().deviceAvailable) { load (); } else { @@ -69,6 +69,7 @@ params.addBodyParameter(Device.FieldNames.sn, authorationId); params.addBodyParameter(Device.FieldNames.type, CommonVariables.DeviceType.ANDROID_DEVICE); + params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId()); x.http().post(params, new BaseCommonCallBack() { public void success() { loadAfterReturn(getList(Device.class)); @@ -98,6 +99,7 @@ RequestParams params = new RequestParams(AppApi.BASE_URL + AppApi.Query.DEVICE_QUERY); params.addBodyParameter(Device.FieldNames.belongId, device.getBelongId()); params.addBodyParameter(Device.FieldNames.type, CommonVariables.DeviceType.CAMERA1); + params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId()); x.http().post(params, new BaseCommonCallBack() { public void success() { List<Device> devices = resultBean.getList(Device.class); @@ -112,6 +114,7 @@ params = new RequestParams(AppApi.BASE_URL + AppApi.Query.DEVICE_QUERY); params.addBodyParameter(Device.FieldNames.belongId, device.getBelongId()); params.addBodyParameter(Device.FieldNames.type, CommonVariables.DeviceType.CAMERA2); + params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId()); x.http().post(params, new BaseCommonCallBack() { public void success() { List<Device> devices = resultBean.getList(Device.class); @@ -195,7 +198,7 @@ return sharedPreferences.getString(key, ""); } - public String getCamera1Address() { + public String getCamera2Address() { String username = "admin"; String password = "admin12345"; String ip = "192.168.1.70"; @@ -217,10 +220,12 @@ // return "rtsp://"+username+":"+password+"@"+ip+":"+port+"/h264/ch1/sub/av_stream"; // return "rtsp://Admin:1234@192.168.1.22/h264"; - return "rtsp://admin:a1234567@192.168.1.132:554/h264/ch1/sub/av_stream"; +// return "rtsp://admin:a1234567@192.168.1.132:554/h264/ch1/sub/av_stream"; + return "rtsp://admin:admin12345@192.168.1.202:554/h264/ch1/main/av_stream"; +// return "rtsp://admin:a1234567@192.168.1.132:554/h264/ch1/main/av_stream"; } - public String getCamera2Address() { + public String getCamera1Address() { String username = "admin"; String password = "a1234567"; String ip = "192.168.1.68"; @@ -243,7 +248,10 @@ //return "rtsp://"+username+":"+password+"@"+ip+":"+port+"/h264/ch1/sub/av_stream"; // return "rtsp://admin:a1234567@192.168.1.68:554/h264/ch1/main/av_stream"; - return "rtsp://admin:a1234567@192.168.1.69:554/h264/ch1/sub/av_stream"; +// return "rtsp://admin:a1234567@192.168.1.69:554/h264/ch1/sub/av_stream"; +// return "rtsp://Admin:1234@192.168.1.22/h264"; + return "rtsp://admin:a1234567@192.168.1.201:554/h264/ch1/main/av_stream"; } + } -- Gitblit v1.8.0