I'm trying to create a String and then append it to a URL. But, for some reason, the toString() method doesn't work. From what I can tell, it just gives me a blank String (there IS text in the EditText).
I don't believe there are any exceptions. It just returns a blank String, as far as I can tell.
Ummm I'm not exactly sure >_< But it's Android 1.6.
Code:
text = edittext.getText().toString();
//use text to make finalTextG have "+"
googleURL += finalTextG;
guri = Uri.parse(googleURL);
Intent gintent = new Intent(Intent.ACTION_VIEW, guri);
startActivity(gintent);
EDIT: Nvm I got it working.
Code:
String text = edittext.getText().toString();
text.replaceAll(" ", "+");
googleURL += text;
guri = Uri.parse(googleURL);
Intent gintent = new Intent(Intent.ACTION_VIEW, guri);
startActivity(gintent);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.