Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid intent sending data
    primarykey
    data
    text
    <p>Here is my button click listener</p> <pre><code> go.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub // Tab for Photos go(); //photospec.setIndicator(url.getHost().replace("www."," ").replace(".com"," ")); } }); </code></pre> <p>Here is my go() method</p> <pre><code>public void go(){ photospec = tabHost.newTabSpec(""); // setting Title and Icon for the Tab // Intent intent = new Intent(getBaseContext(), SignoutActivity.class); // intent.putExtra("EXTRA_SESSION_ID", sessionId); //startActivity(intent) URL url = null; try { url = new URL( text.getText().toString()); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } photospec.setIndicator(url.getHost().replace("www."," ").replace(".com"," ")); photosIntent = new Intent(getBaseContext(),PhotosActivity.class); //photosIntent.setClass(this, PhotosActivity.class); photosIntent.putExtra("URL1", text.getText().toString()); photospec.setContent(photosIntent); if(counter==0){ tabHost.addTab(photospec); } counter++; } </code></pre> <p>I have a button click method in this method I am calling function which name is <code>go()</code> in</p> <p>this <code>go()</code> method ,I am creating a tab and i have intent. In this intent I am sending some </p> <p>information to another class.</p> <p>Problem is when I click button first time I can send data to another class normally. However when I click twice or more times this intent does not send data to other class.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload