在改造库中注册

时间:2018-01-30 13:32:39

标签: android android-intent

       @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();
             }
         });
}

http://localhost/shop/api2/registration.php?firstname=amol&lastname=vasekar&email=test124@gmail.com&Telephone=1234567890&Password=1234567

{"success":1,"message":"Registered successfully."}

我的意图不起作用。

0 个答案:

没有答案