how to get a variable in an activity from another activity and make the main activity to use variable after initializing from there ?(kotlin )
my kotlin project has 2 activitis (main , second called : AddPlayer)
main activity has a button called "Add a player" that it starts second activity .
in second activity i have 2 edit text to get a number and a text from user .
after press submit button in second activity , in the main activity i want add these values to my mutablelist
but idk how to do it
( i think it crashed because main activity uses those variables before getting values from user)
plz guide me .
my activity code :
class...