예제 #1
0
 public void onDestroy() {
   MsrInterface.cancelPoll();
   isPollCanceled = true;
   MsrInterface.close();
   if (null != waitDataLooper) {
     waitDataLooper.quit();
   }
 }
예제 #2
0
  public void onStart() {
    if (MsrInterface.open() < 0) {
      MsrInterface.close();
      MsrInterface.open();
    }

    Handler handler = new Handler(waitDataLooper);
    handler.post(
        new Runnable() {
          @Override
          public void run() {
            int timeout = 300000;
            gotoPoll(timeout);
          }
        });
  }