コード例 #1
0
    @Override
    public void run() {
      // TODO Auto-generated method stub
      Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
      refreshTime = System.currentTimeMillis();

      String filePath = FileCatchConfigUtil.getCatchPath() + "bithealth.apk";
      ;

      IServerBusiness.getInstance(DownLoadApkService.this.getApplicationContext())
          .DownLoadFile(downloadApkUrl, filePath, DownLoadApkService.this);
    }
コード例 #2
0
 @Override
 public void run() {
   // TODO Auto-generated method stub
   try {
     long timeLast =
         AndroidConfiguration.getInstance(mContext).getLastUpdateTime(KEY_CONFIG_UPDATE_TIME);
     long nowTime = new Date().getTime();
     if (timeLast == -1 || (nowTime - timeLast) >= UPATE_TIME_INTERVAL) {
       CheckVersionBean bean = IServerBusiness.getInstance(mContext).checkAppVersion();
       mCallback.checkVersionCallback(0, "ok", bean);
     }
   } catch (BusinessException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
     mCallback.checkVersionCallback(e.retCode, e.getMessage(), null);
   }
 }