@Override
 public void run() {
   // TODO Auto-generated method stub
   try {
     refreshAll();
     handler.postDelayed(this, 3000);
   } catch (Exception e) {
     // TODO: handle exception
     Logger.e(e.getMessage());
   }
 }
示例#2
0
  public FileModel save(Context context) {
    FileDAO dao = null;
    FileModel file = null;
    try {
      dao = daoFactory.getFileDAO(context);
      file = dao.save(this);
    } catch (Exception e) {
      // TODO: handle exception
      Logger.e(e.getMessage());
    } finally {
      dao.close();
    }

    return file;
  }