Show response in next activity can be done in following ways
Solution 1 response comes in string so pass whole response to next activity by using
like this
step 1
step 3 and in next activity like this
Solution 3 : Make a static Arraylist of hashmap and use it in any activity
or there may be more solutions .....
enjoy coding
Solution 1 response comes in string so pass whole response to next activity by using
         intent.putExtras("Key",response); like this
step 1
public class SingleObject {
 //create an object of SingleObject
 private static SingleObject instance = new SingleObject();
 private String name;
 private String age;
 //make the constructor private so that this class cannot be
 //instantiated
   private SingleObject(){}
 //Get the only object available
 public static SingleObject getInstance(){
  return instance;
 }
  // here u can declare getter setter
public String getName() {
    return name;
}
public void setName(String name) {
    this.name = name;
}
public String getAge() {
    return age;
}
public void setAge(String age) {
    this.age = age;
}
}          Singleton tmp = Singleton.getInstance( );
  tmp.setName(""); step 3 and in next activity like this
     Singleton tmp = Singleton.getInstance( );
  String name =  tmp.getName;Solution 3 : Make a static Arraylist of hashmap and use it in any activity
or there may be more solutions .....
enjoy coding
  
No comments:
Post a Comment