In my android application when two or more words are entered separated by space character it force closes!
<p>There is an option to write reviews in my android application.
it accepts a single word of any length, but it does not accept two or more words separated by a space character.it force closes when the submit button is pressed.plz help</p>

<p>why is this happening?the code for what happens when the submit button is clicked is given below:</p>

<pre><code>public class WriteRev extends Activity {
EditText name;
EditText title;
EditText msg;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.wr);
    msg=(EditText)findViewById(R.id.EditText03);
    title=(EditText)findViewById(R.id.EditText02);
    name=(EditText)findViewById(R.id.EditText01);
    Button b=(Button)findViewById(R.id.Button01);
     b.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            String Name=name.getText().toString();
            String Title=title.getText().toString();
            String Msg=msg.getText().toString();
            if(Name.equalsIgnoreCase("")|| Title.equalsIgnoreCase("") || Msg.matches("^[ ]*$")  )
            {
                Toast.makeText(WriteRev.this,"fields cannot be empty...", Toast.LENGTH_LONG).show();
            }
            else
            {


            String url="http://192.168.1.100:8080/finder/review/wr?name="+Name+"&amp;title="+Title+"&amp;message="+Msg+"&amp;place="+Contents.id;
            Toast.makeText(getBaseContext(), "review added" , Toast.LENGTH_SHORT).show();
            JSONObject retData=RestClient.connect(url, WriteRev.this);
    /*      Intent k = new Intent();
            k.setClass(WriteRev.this, Contents.class);
            startActivity(k);*/

            }
        }
});

   Button b1=(Button)findViewById(R.id.Button02);
     b1.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            Intent k = new Intent();
            k.setClass(WriteRev.this, Contents.class);
            startActivity(k);
        }
     });
}

}
</code></pre>

<p>the reported error from logcat is</p>

<pre><code>06-17 12:15:36.403: WARN/KeyCharacterMap(372): No keyboard for id 0
06-17 12:15:36.403: WARN/KeyCharacterMap(372): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
06-17 12:15:38.694: DEBUG/dalvikvm(213): GC freed 243 objects / 14344 bytes in 104ms
06-17 12:15:52.794: INFO/NotificationService(58): enqueueToast pkg=com.lpss callback=android.app.ITransientNotification$Stub$Proxy@44db6998 duration=0
06-17 12:15:53.035: DEBUG/AndroidRuntime(372): Shutting down VM
06-17 12:15:53.044: WARN/dalvikvm(372): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
06-17 12:15:53.054: ERROR/AndroidRuntime(372): Uncaught handler: thread main exiting due to uncaught exception
06-17 12:15:53.093: ERROR/AndroidRuntime(372): java.lang.IllegalArgumentException: Illegal character in query at index 65: http://192.168.1.100:8080/finder/review/wr?name=shalini&amp;title=hey whats up&amp;message=nono n&amp;place=null
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at java.net.URI.create(URI.java:970)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at org.apache.http.client.methods.HttpGet.&lt;init&gt;(HttpGet.java:75)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at com.lpss.RestClient.connect(RestClient.java:69)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at com.lpss.WriteRev$1.onClick(WriteRev.java:42)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.view.View.performClick(View.java:2364)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.view.View.onTouchEvent(View.java:4179)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.widget.TextView.onTouchEvent(TextView.java:6540)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.view.View.dispatchTouchEvent(View.java:3709)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.os.Looper.loop(Looper.java:123)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at android.app.ActivityThread.main(ActivityThread.java:4363)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at java.lang.reflect.Method.invokeNative(Native Method)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at java.lang.reflect.Method.invoke(Method.java:521)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
06-17 12:15:53.093: ERROR/AndroidRuntime(372):     at dalvik.system.NativeStart.main(Native Method)
06-17 12:15:53.114: INFO/Process(58): Sending signal. PID: 372 SIG: 3
06-17 12:15:53.124: INFO/dalvikvm(372): threadid=7: reacting to signal 3
06-17 12:15:53.154: INFO/dalvikvm(372): Wrote stack trace to '/data/anr/traces.txt'
06-17 12:17:24.804: DEBUG/dalvikvm(58): GC freed 21737 objects / 1032728 bytes in 222ms
</code></pre>
