Android
Programming and Technical
Programming
Technical
What is the importance of putExtra() method in Android? How is it different from setData()? Anyway both are passing data, then what is the difference?
Options
1) Both putExtra() and setData() are used for same purpose i.e. to pass data to other component.
2) setData() - is to pass data on which to take action. putExtra() - is to send extra information about this intent.
3) setData() - is to send extra information about this intent. putExtra() - is to pass data on which to take action.
4) Logically both are same, so one can omit setData(), and pass all data through putExtra only.
Read Solution (Total 2)
-
- 1) It is Correct
- 5 years agoHelpfull: Yes(0) No(0)
- option 2 is correct for additional information refer the below link
https://stackoverflow.com/questions/19151692/difference-between-putextra-and-setdata/19151737 - 4 years agoHelpfull: Yes(0) No(0)
Android Other Question