StartupService verifyTourist code new FunctionCallback Object Override

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
StartupService.verifyTourist(code, new FunctionCallback<Object>() {
@Override
public void done(Object object, ParseException e) {
if (e == null) {
// Code is valid
Tour tour = (Tour) object;
// Ok, redirecting to sign up activity
appPreferences.setCurrentTourId(tour.getObjectId());
startActivity(com.noodoe.member.activities.SignUpActivity.createIntent(getApplicationContext()));
finish();
} else {
// Invalid code or other error
e.printStackTrace();
Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_LONG).show();
}
progressDialogFragment.dismiss();
}
});