web services - Login in android with credentials -


this question has answer here:

i working on chat application in have set login id password credentials edittext , according responce , have go further screens.

when using credentials statically, getting response webservice

 string url="http://tokerapp.com/ws/get_login.php?username=rc&password=rahul";                 try {                     string res=customhttpclient.executehttpget(url);                     log.e("$$$$$$$$",res); 

but when taking credentials edittexts, giving me proper response.

    tvlogin = (edittext)findviewbyid(r.id.editusername);         tvpass = (edittext)findviewbyid(r.id.editpassword);         btnlogin = (button)findviewbyid(r.id.btnlogin);  btnlogin.setonclicklistener(new view.onclicklistener() {              @override             public void onclick(view v) {  string usrnme = tvlogin.gettext().tostring().trim(); string psswrd = tvpass.gettext().tostring().trim();  string url="http://tokerapp.com/ws/get_login.php?username=usrnme&password=psswrd";                 try {                     string res=customhttpclient.executehttpget(url);                     log.e("$$$$$$$$",res); 

string url="http://tokerapp.com/ws/get_login.php?username=" + usrnme + "&password=" + psswrd; 

Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -