| | |
| | | import cn.com.basic.face.base.MainActivity;
|
| | | import cn.com.basic.face.discern.common.CommonVariables;
|
| | | import cn.com.basic.face.fragment.DeviceFragment;
|
| | | import cn.com.basic.face.service.sqlite.AttendanceDao;
|
| | | import cn.com.basic.face.service.sqlite.DeviceDao;
|
| | | import cn.com.basic.face.service.sync.DeleteLastMonthRecordAndPictureThread;
|
| | | import cn.com.basic.face.service.sync.SyncDownThread;
|
| | | import cn.com.basic.face.util.AppApi;
|
| | |
|
| | | import org.xutils.http.RequestParams;
|
| | |
| | | import cn.com.basic.face.discern.common.BaseCommonCallBack;
|
| | | import cn.com.basic.face.discern.entity.Device;
|
| | | import cn.com.basic.face.util.SharedPreferencesUtils;
|
| | | import cn.com.basic.face.service.sync.SyncUpThread;
|
| | |
|
| | | public class DeviceMng {
|
| | | public static DeviceMng instance = new DeviceMng();
|
| | |
|
| | | private SyncUpThread syncUpThread = null;
|
| | | private SyncDownThread syncDownThread = null;
|
| | | private DeleteLastMonthRecordAndPictureThread deleteLastMonthRecordAndPictureThread = null;
|
| | |
|
| | | public static String authorationId = "101";
|
| | |
|
| | |
| | | // });
|
| | | // return;
|
| | | // }
|
| | | if (MainActivity.getInstance().getInternetAccessible() == CommonVariables.InternetAccess.INTERNET_NOT_INITIALIZE) {
|
| | | return;
|
| | | }
|
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL + AppApi.Query.DEVICE_QUERY);
|
| | |
|
| | |
| | | }
|
| | | }
|
| | | });
|
| | | synchronized (this) {
|
| | | if (syncUpThread == null) {
|
| | | syncUpThread = new SyncUpThread();
|
| | | syncUpThread.start();
|
| | | }
|
| | | if (syncDownThread == null) {
|
| | | syncDownThread = new SyncDownThread();
|
| | | syncDownThread.start();
|
| | | }
|
| | | if (deleteLastMonthRecordAndPictureThread == null) {
|
| | | deleteLastMonthRecordAndPictureThread = new DeleteLastMonthRecordAndPictureThread();
|
| | | deleteLastMonthRecordAndPictureThread.start();
|
| | | }
|
| | | }
|
| | | } else {
|
| | | Toast.makeText(BaseApplication.getInstance(), "数据库中找不到该设备", Toast.LENGTH_SHORT).show();
|
| | | }
|
| | |
| | | return sharedPreferences.getString(key, "");
|
| | | }
|
| | |
|
| | | public String getCamera1Address() {
|
| | | public String getCamera2Address() {
|
| | | String username = "admin";
|
| | | String password = "admin12345";
|
| | | String ip = "192.168.1.70";
|
| | |
| | |
|
| | | // 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";
|
| | |
| | | //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:1234@192.168.1.22/h264";
|
| | | // return "rtsp://Admin:1234@192.168.1.22/h264";
|
| | | return "rtsp://admin:a1234567@192.168.1.201:554/h264/ch1/main/av_stream";
|
| | | }
|
| | |
|
| | |
|