public void FloorInit() { id = 0; FloorList = new ArrayList<Floor>(); Floor[] floor_arr = null; try { Log.e("DB service", "Service : " + svc.toString()); Log.e("DB service", "callgetallfloor"); floor_arr = svc.getAllFloors(); Log.e("DB service", "Service : " + floor_arr); if (floor_arr == null) return; } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } if (floor_arr != null) { for (Floor f : floor_arr) { FloorList.add(f); Log.e("fd", f.toString()); id = f.getId().intValue(); } } }