@Override
public void onResponse(Call<RegisterModel> call, Response<RegisterModel> response) {
if(response.body().getSuccess()==1){
startActivity(new Intent(RegisterActivity.this, MainActivity.class));
Toast.makeText(RegisterActivity.this, "Registration successfully ", Toast.LENGTH_SHORT).show();
}
if(response.body().getSuccess()==0){
Toast.makeText(RegisterActivity.this, "Entered Email already exit ", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onFailure(Call<RegisterModel> call, Throwable t) {
Toast.makeText(RegisterActivity.this, "Registration failed ", Toast.LENGTH_SHORT).show();
}
});
}
{"success":1,"message":"Registered successfully."}
我的意图不起作用。