0

How can I send a nodelist between Activities? I have an app in which there are 4 screens with four activities. In first activity I parse url to get a nodelist. When the button is clicked I need to start new activity and send nodelist to the second activity.
I tried this way

Intent intent = new Intent(this, SecondActivity.class);
Bundle bundle = new Bundle(); 
bundle.putString("KEY","NodeList"); 

intent.putExtras(bundle);
startActivity(intent);
overbet13
  • 1,654
  • 1
  • 20
  • 36
ipauler
  • 48
  • 1
  • 11
  • Please specify the meaning of `NodeList` – overbet13 Jul 03 '12 at 11:14
  • The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. http://developer.android.com/reference/org/w3c/dom/NodeList.html – ipauler Jul 03 '12 at 11:20

2 Answers2

0

Make the class that implements interface NodeList also implement interface Parcelable and use this method on the intent.

overbet13
  • 1,654
  • 1
  • 20
  • 36
0

Simple way is that you can use Application class so that you can set a value using Setter method in Application and can get back the values using getter method in Application class..

Data will retain until your Application exists , so you can use it.. How to use Application class in Android

Also you can use Android Parcelable

Community
  • 1
  • 1
Venky
  • 11,049
  • 5
  • 49
  • 66