I want to make an app which plays sounds with different amount of times between sounds but I don't know how to do it. The amount of times are defined by the user in EditText in a setting activity and then the songs are played in another activity so I need to link the EditText value in the other activity. Here is my code to transform the content of my EditText into a variable but I don't know how to use it in my other interface :
EditText myEdit = (EditText) findViewById(R.id.editText1);
String myEditValue = myEdit.getText().toString();
time = Integer.parseInt(myEditValue);
It would be even better if someone can tell me how to transfer my EditText value in an enum but if you only know how to transfer between activities and not from an activity to an enum it will be ok.
Here is my enum code :
public enum phaseTimer {
WAITING("APPUYEZ", valueInEditText1),
LOADING("ATTENTE", valueInEditText2),
ON_YOUR_MARK("A VOS MARQUES", valueInEditText3),
READY("PRET", valueInEditText4),
GO("PARTEZ", valueInEditText5);
public String message;
public int time;
phaseTimer(String message, int time) {
this.message = message;
this.temps = temps;
}
public String getMessage() {
return message;
}
}