I want to save a variable defined in one activity as a string in another activity in a shared preference. However, since the variable is not defined in the activity to be saved, if it is set to ${〇〇}, an error will occur if it cannot be referenced. I just want to save it as a string here, but is there any good way? Please let me know if anyone knows. Thank you.

  • Answer # 1

    Isn't it good to pass a character string as an intent from "one activity" to "another activity"?