Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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