I already have a program that carries text from class to another but I want to make a program that can carry text from one class to another.
String l1 = ing1.getText().toString();
String a = ing2.getText().toString();
String b = ing3.getText().toString();
String c = ing4.getText().toString();
String d = ing5.getText().toString();
String e = ing6.getText().toString();
Intent intent = new Intent(getApplicationContext(), classA.class);
intent.putExtra("A", l1);
intent.putExtra("B", a);
intent.putExtra("C", b);
intent.putExtra("D", c);
intent.putExtra("E", d);
intent.putExtra("F", e);
startActivity(intent);
//PART2 (INTENTS)
String title1 = title.getText().toString();
String s1 = step1.getText().toString();
String s2 = step1.getText().toString();
String s3 = step1.getText().toString();
String s4 = step1.getText().toString();
String s5 = step1.getText().toString();
String s6 = step1.getText().toString();
String s7 = step1.getText().toString();
String s8 = step1.getText().toString();
// create a new intent
Intent i = new Intent(getApplicationContext(), classB.class);
// put the name and phone(to be sent to other activity) in intent
i.putExtra("TITLE", title);
i.putExtra("STEP1", s1);
i.putExtra("STEP2", s2);
i.putExtra("STEP3", s3);
i.putExtra("STEP4", s4);
i.putExtra("STEP5", s5);
i.putExtra("STEP6", s6);
i.putExtra("STEP7", s7);
I want to be able to carry the first intent to class a and when a button in class a is pressed I want it to go to class b and to carry the intent. Can this be done?