예제 #1
0
 @Override
 public void onRequestSuccess(ErrorResponseObject error) {
   Log.d(TAG, "success: " + error.isSuccess() + " message: " + error.getMessage());
   if (error.isSuccess()) {
     Toast.makeText(getApplicationContext(), "Sent friend request", Toast.LENGTH_LONG).show();
   } else {
     Toast.makeText(
             getApplicationContext(),
             "Failed to add friend: " + error.getMessage(),
             Toast.LENGTH_LONG)
         .show();
   }
   searchFriend.setText("");
 }
예제 #2
0
    @Override
    public void onRequestSuccess(ErrorResponseObject error) {
      Log.d(TAG, "success: " + error.isSuccess() + " message: " + error.getMessage());
      if (error.isSuccess()) {
        Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG).show();

      } else {
        Toast.makeText(
                getApplicationContext(),
                "Failed to confirm friend: " + error.getMessage(),
                Toast.LENGTH_LONG)
            .show();
      }
      // send request
      FriendsList.this.setProgressBarIndeterminateVisibility(true);
      FriendsListRequest request = new FriendsListRequest(dh.authToken());
      spiceManager.execute(request, new FriendsListRequestListener());
    }