예제 #1
0
 /**
  * Verify the user with the employee data
  *
  * @param employeeData employee data
  */
 public void verifyUser(JSONObject employeeData) {
   try {
     employeeIdToCompare = employeeData.getString(Values.API.Keys.EMPLOYEE_ID_KEY);
     simpleNumberInputViewDialog.show();
   } catch (Exception e) {
     e.printStackTrace(System.out);
   }
 }
 private void getDataFromServer() {
   JSONObject employeeData = null;
   if (!stopGettingData) {
     try {
       employeeData = bundyAPI.getBundyStatus(employeeID);
       System.out.println("DATA FROM SERVER: " + employeeData);
       if (employeeData != null
           && employeeData.length() > 0
           && employeeData.getInt(Values.API.Keys.STATUS_KEY) != 0) { // possibly remove
         bundyAPIConcurrentUtilCallbackImplementation.receiveEmployeeData(employeeData);
         stop();
       } else {
         handler.postDelayed(runnable, SYNC_DELAY);
       }
     } catch (Exception e) {
       System.out.println("here");
       log.log(Level.SEVERE, e.toString(), e);
       e.printStackTrace(System.out); // remove
       handler.postDelayed(runnable, SYNC_DELAY);
     }
   }
 }