1

I'm trying to transfer a string from one activity to another in android. I'm working off of this answer: How to use putExtra() and getExtra() for string data

However, I think I'm doing something really basic incorrectly. When I type "i.putExtra" I get the error "cannot resolve putExtra." Do I need to import something to use putExtra?

In the documentation for putExtra it seems that I should be able to use it as long as I've imported android.content.Intent, which I have.

Community
  • 1
  • 1
Tara
  • 11
  • 1
  • 3

1 Answers1

0

You have to put the code into the OnCreate() statement.

hurkaperpa
  • 131
  • 11