Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6022921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:55:44+00:00 2026-05-23T03:55:44+00:00

There is an option to write reviews in my android application. it accepts a

  • 0

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

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

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+"&title="+Title+"&message="+Msg+"&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);
        }
     });
}

}

the reported error from logcat is

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&title=hey whats up&message=nono n&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.<init>(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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:55:45+00:00Added an answer on May 23, 2026 at 3:55 am

    you have replace space by “%20” because URL does not accept space character . use the following code

    String url="http://192.168.1.100:8080/finder/review/wr?name="+Name.replace(" ", "%20")+"&title="+Title.replace(" ", "%20")+"&message="+Msg.replace(" ", "%20")+"&place="+Contents.id;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using django comments framework http://docs.djangoproject.com/en/dev/ref/contrib/comments/ Not sure is there option, to make all comments
Is there any option to clear the console screen in Java as clrscr() in
Is there any option to call msi file from CreateProcess in c language in
I there any option to restart in the visual studio when my product install?
AucTeX on emacs is pretty amazing tool, but when I write one single '$',
Does anyone know if there is some option in VS2010 or some third party
I have seen one application in which there was a button of write a
i need to write simple android application that run on the background and read
I know there is a dedicated area for Android issues, BUT I just want
Is there an option for the curl command to show only a percentage output

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.