2
Giolin
6y

Hi guys,

i want do develop an android app, but i have an important question.
How many ways are there to transfer datas between two or more activities?
I know just this one: intent.putExtra()

Can anyone help me?
Thanks in advance

Comments
  • 2
    That works well, you could also use an interface.
  • 1
    @ryanmhoffman do you know other methods, that does the same?
  • 1
    I’m sure there are other ways but honestly 99% of the time intent is the way to go. When working with fragments interfaces are common too. What type of data are you trying to pass between activities?
  • 1
    Thank you for your answer. I need to transfer only strings, but I need to know all methods which are possible to transfere data between activities.
  • 0
    @Giolin well there might be other methods but for Strings you will most likely want to use intents. They will be quickest and easiest.
Add Comment