Skip to content

Instantly share code, notes, and snippets.

@yelinaung
Created September 10, 2015 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yelinaung/33af517bf3655ce8e6f2 to your computer and use it in GitHub Desktop.
Save yelinaung/33af517bf3655ce8e6f2 to your computer and use it in GitHub Desktop.
String voterName = "အောင်ဆန်းစုကြည်";
String voteDob = "1945-06-19";
Map<String, String> params = new HashMap<>();
params.put("dateofbirth", voteDob);
params.put("nrcno", null);
params.put("father_name", null); // optional
Call<Voter> voterCall = checkVoterService.searchVoter(voterName, params);
voterCall.enqueue(new Callback<Voter>() {
@Override public void onResponse(Response<Voter> response) {
Voter voter = response.body();
result.setText(
voter.getVoterName() + "\n" + voter.getDateOfBirth() + "\n" + voter.getNrcno());
}
@Override public void onFailure(Throwable throwable) {
// Handle the failure
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment