What is the difference between Intent Extra and Intent Data?
I see that any intent has an extra
field and a data
field.
What is the difference between them or is it just a conceptual difference?
Solution
Data
The
URI (Uri object) that references the data to be manipulated and/or the MIME type of that data. The type of data provided is typically determined by the action of the intent. For example, if the action is ACTION_EDIT, the data should contain the URI of the document to be edited.
The data returns a URI
Extras
Key-value pairs that carry additional information needed to complete the requested operation. Just as some operations use specific types of data URIs, some operations use specific additions.
Extras contains a bundle, which is an implementation of a HashMap that stores key values for specific data.
Additional return pack
For more information about intent extra and data, see this URL