Created
July 31, 2012 03:20
-
-
Save marialecodes/3213218 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.xxx; | |
import com.parse.CountCallback; | |
import com.parse.ParseException; | |
import com.parse.ParseQuery; | |
import com.parse.ParseUser; | |
public class ParseList { | |
// getGames() Busca partidas donde el "player1" sea el usuario actual. | |
public void getGames() { | |
ParseUser currentUser = ParseUser.getCurrentUser(); | |
ParseQuery gamesQuery = new ParseQuery ("Game"); | |
gamesQuery.whereEqualTo("player1", currentUser); | |
gamesQuery.countInBackground(new CountCallback() { | |
public void done(int count, ParseException e) { | |
if (e == null) { | |
// Se obtiene la lista de objetos "Game" | |
showGames(count); | |
} | |
else { | |
// No hay partidas | |
} | |
} | |
}); | |
} | |
public void showGames(int count){ | |
// ?? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment