0

I have created three activities which contains forms. Once we done with the first activity it takes us to the Second and then third. Now on third activity I want to send whole data of first, second and third activity in one shot to the server. is there any way to achieve this.

I have tried this.

import android.app.Application;

 public class Holder extends Application{


protected  String getProductName;
protected String getRefCode ;
protected String getShortDes;
protected String getFullDes;
protected String getBarCode ;
protected String getwhereToDisplay;
protected String getCondition;

protected String getTechspec;
protected String getKeyfeature;
protected String getDisplayMode;

protected String getAddTags;
protected String getQauantity;



 private String globalVariable="aa";

 public String getGlobalVariable() {
         return globalVariable;
 }

 public void setGlobalVariable(String getProductName) {
         this.globalVariable = globalVariable;
 }
 @Override
 public void onCreate() {
         //reinitialize variable
 }

 }

following article I had try but didn't worked.

link link Thank you in advance.

Community
  • 1
  • 1
ZeroView
  • 142
  • 1
  • 15
  • 1
    yes, there are several ways to do this, you can make an arraylist or hashmap to store the data and at the end send the list, or you can store in local db and then send it, you can use SharedPreferences, you can pass data form first activity to second and second to third and finally send it. – Amitabh Sarkar Nov 19 '15 at 12:35
  • @AmitabhSarkar how by using bundle or something else ? – ZeroView Nov 19 '15 at 12:45
  • Maybe the best way is storing the data in a singleton model class. – Nanoc Nov 19 '15 at 12:53
  • yes @CrazyCoder using bundle object you bind data to it and then pass it to another activity via intent. – Amitabh Sarkar Nov 20 '15 at 04:19

0 Answers0