| | |
| | | String headPicture = "";
|
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
| | | String createTime = sdf.format(new Date());
|
| | | String sql = "insert into offline_surveillance(raw_data_path, camera_in_or_out, create_time) values('" +
|
| | | rawDataFileName + "','" +
|
| | | cameraInOrOut + "','" +
|
| | | createTime + "'" +")";
|
| | | MainActivity.getInstance().db.execSQL(sql);
|
| | | UnknownSurveillanceQueryItemUtil.getInstance().addItems(bitmapList);
|
| | | MainActivity.getInstance().db.execSQL(
|
| | | "insert into offline_surveillance(raw_data_path, camera_in_or_out, create_time) values('" +
|
| | | rawDataFileName + "','" +
|
| | | cameraInOrOut + "','" +
|
| | | createTime + "'" +")"
|
| | | );
|
| | |
|
| | | readOfflineUnknownFromLocal();
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | if (file.exists()) {
|
| | | file.delete();
|
| | | }
|
| | | MainActivity.getInstance().db.execSQL("delete from offline_unknown where raw_data_path='"+item.getRawDataPath()+"'");
|
| | | MainActivity.getInstance().db.execSQL("delete from offline_surveillance where raw_data_path='"+item.getRawDataPath()+"'");
|
| | | }
|
| | | catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | public boolean hasMoreOfflineSurveillance() {
|
| | | boolean hasMore = false;
|
| | | String sql = "select count(*) from offline_surveillance order by create_time ";
|
| | | Cursor c = MainActivity.getInstance().db.rawQuery(sql, new String[]{});
|
| | | if (c.moveToFirst()) {
|
| | | hasMore = c.getInt(0) > 0;
|
| | | }
|
| | | return hasMore;
|
| | | }
|
| | |
|
| | | }
|