@Override
  protected Object doInBackground(Object[] params) {

    BackendlessCollection<Player> result = Backendless.Persistence.of(Player.class).find();
    Iterator<Player> iterator = result.getCurrentPage().iterator();

    while (iterator.hasNext()) {
      Player player = iterator.next();
      String playerName = player.getPlayerName();
      infoPlayerList.add(playerName);
    }

    return null;
  }
        @Override
        public void handleResponse(BackendlessCollection<SearchMatchesResult> response) {
          for (SearchMatchesResult geoPoint : response.getCurrentPage()) {

            if (geoPoint.getGeoPoint().equals(targetUserGeoPoint)) {
              travelMatchCount = geoPoint.getMatches();
              if (travelMatchCount <= 1) travelMatchCount = travelMatchCount * 100;
              travelMatchValue.setText(String.valueOf(round(travelMatchCount, 2)));
              travelProgressBar.setProgress((int) round(travelMatchCount, 2));
              travel = true;
            }
          }

          if (music == true && food == true && hobbies == true && travel == true) {
            summMatch =
                (foodMatchCount + musicMatchCount + hobbiesMatchCount + travelMatchCount) / 4;
            matchPercentField.setText(String.valueOf(round(summMatch, 2)));
            progressDialog.cancel();
          }
        }
Example #3
0
 private void convertToList(BackendlessCollection<SellTapOffer> nextPage) {
   offerList.addAll(nextPage.getCurrentPage());
   adapter.notifyDataSetChanged();
 }