Movie_search is a text field got from the user and ive referenced it by using
movie_search= (EditText)findViewById(r.id.editText);
and same goes for the button too
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.i(NEWS,"IMDB LINK->:"+movie_search);
URL="http://www.omdbapi.com/?t="+movie_search+"";
Log.i(NEWS,"IMDB LINK->:"+URL);
new DownloadConfigurationTask().execute(URL);
}
});
the problem is the string doesnt seem to append to the url, the log i get is
IMDB LINK->:movie_search
IMDB LINK->:http://www.omdbapi.com/?t=
instead of
IMDB LINK->:movie_search
IMDB LINK->:http://www.omdbapi.com/?t=movie_search
any ideas what might be the problem ?
use EditText.getText()
for getting text entered by user and append it with URL instead of EditText instance. change it as:
URL="http://www.omdbapi.com/?t="+movie_search.getText()+"";