Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Main entry point for accessing the Challenges data
import android.support.annotation.NonNull;
/**
* This is the main entry point for accessing the Challenges data
*/
public interface ChallengesDataStore {
// Get all challenge data
void getChallenges(@NonNull GetChallengesCallback getChallengesCallback);
// Save all challenge data
void saveChallenges(@NonNull Challenge challenge);
// Clear persisted challenge data
void deleteAllChallenges();
// Callback interface
interface GetChallengesCallback {
void onChallengesLoaded(List<Challenge> challenges);
void onError(Exception errorMessage);
void onDataNotAvailable();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment