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 1021347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:17:53+00:00 2026-05-16T11:17:53+00:00

b = this.getIntent().getExtras(); s = this.getIntent().getStringExtra(DEFAULTTEXT); public void onClick(View v) { String a =

  • 0
    b = this.getIntent().getExtras();
    s = this.getIntent().getStringExtra("DEFAULTTEXT");    

public void onClick(View v) 
        {


            String a = "http://152.226.152.156:1010/jsp-examples/test1";
             URL url = null;
                HttpURLConnection httpurlconnection = null;
                try {
                 url = new URL(a);
                 httpurlconnection = (HttpURLConnection) url
                   .openConnection();
                 httpurlconnection.setDoOutput(true);
                 httpurlconnection.setRequestMethod("POST");


                 Toast.makeText(Booking.this, a, Toast.LENGTH_SHORT).show();
                 Toast.makeText(Booking.this, "Toast1", Toast.LENGTH_SHORT).show();
                 ObjectOutputStream dos = new ObjectOutputStream(httpurlconnection.getOutputStream());
                 SendVEctor.add(txtArrivalTime.getText().toString());
                 SendVEctor.add(txtFerry.getText().toString());
                 SendVEctor.add(txtStatus.getText().toString());
                 SendVEctor.add(txtDestination.getText().toString());
                 SendVEctor.add(s.toString());

                    dos.writeObject(SendVEctor);

                     dos.close();

s would be my intent and how would i put it into my SendVEctor?

Thank you.

  • 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-16T11:17:54+00:00Added an answer on May 16, 2026 at 11:17 am

    s is not your intent, s is the value of the DEFAULTTEXT attribute of your actual intent. From the question, it’s really hard to tell what you want to achieve.

    The actual code adds this value to the vector. Because all things you add to the vector are String, I assume the vector is declared and constructed like this:

     Vector<String> SendVEctor = new Vector<String>();
    

    In this case you won’t be able to add the intent object to the vector, because this vector can hold nothing but Strings.

    If the vector is untyped, in other words, declared and constructed like this:

     Vector SendVEctor = new Vector();
    

    then you’ll be able to add the intent with the expression

    SendVEctor.add(this.getIntent());
    

    but: Intent is not serializable so you won’t be able to write the vector to the ObjectOutputStream.

    Please add some more details and explain what you really want to serialize. Just text or text mixed with objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Tts.java public void onInit(int arg0) { Bundle dataBundle = Tts.this.getIntent().getExtras(); speech = dataBundle.getString(IMSENS); tts.setLanguage(Locale.ENGLISH);
I'm recieving a Float Array from a Bundle like so... Bundle b = this.getIntent().getExtras();
This is my code: boolean startGameBoolean; Bundle extras = getIntent().getExtras(); extras.getInt(startGameBoolean); if (startGameBoolean =
I always get this error public class FlightAvailabityGoActivity extends ListActivity { String[] monthName =
This is my code: <CheckBox android:id=@+id/sprint_checkbox android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/sprint_game /> <CheckBox android:id=@+id/marathon_checkbox android:layout_width=fill_parent android:layout_height=wrap_content
I'm sharing some variables accross activities by using a class like this : public
I've really tried to get through the intent.putExtra() and getIntent().getExtras() and apply them to
Receiver: public class ProximityAlert extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent)
RoomInfoActivity.java: http://pastebin.com/L9fFsFeH (note: this is the 3rd activity launched by the same application, not
this is my first question in here, and I would like to ask if

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.